Skip to content

Handle initial device provisioning in an async task rather than a synchronous API request #12753

@rtibbles

Description

@rtibbles

Observed behavior

We currently do initial provisioning in a synchronous API request.
If this takes a long time, there is a risk that this can timeout, which can lead to a confusing user experience.

This may be exacerbated by running on a platform where cryptography is not usable, either because of the specific Python version, or the OS/architecture it is running on.

Expected behavior

Everything that is done during the serializer create step for provisioning should happen in an asynchronous task defined in kolibri/core/device/tasks.py.

Validation should be moved to a dedicated tasks validator.

Frontend initialization of provisioning should be updated to create the appropriate task.

The frontend should then track the status of the provisioning task and then redirect when the task is complete.

User-facing consequences

Confusion during onboarding.

Metadata

Metadata

Assignees

Labels

P0 - criticalPriority: Release blocker or regression

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions