-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create task for initial device provisioning #13102
base: develop
Are you sure you want to change the base?
Create task for initial device provisioning #13102
Conversation
Build Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave the task API untouched for now, this close to release!
throw new Error('Device provisioning task not found'); | ||
} | ||
if (task.status === TaskStatuses.COMPLETED) { | ||
const facilityId = task.result.facility_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this to the extra_metadata
instead, rather than updating the API endpoint to return result.
kolibri/core/tasks/api.py
Outdated
@@ -100,6 +100,7 @@ def _job_to_response(self, job): | |||
"args": job.args, | |||
"kwargs": job.kwargs, | |||
"extra_metadata": job.extra_metadata, | |||
"result": job.result, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not add this, and just utilize extra_metadata instead.
provision_device(**provisioning_data) | ||
|
||
schedule_ping() # Trigger telemetry pingback after we've provisioned | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job = get_current_job()
if job:
job.update_metadata(facility_id=facility.id)
self.client.get(initialize_url) | ||
data = self._default_provision_data() | ||
del data["superuser"] | ||
data.update({"auth_token": "test"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rtibbles with the new task implementation, I am not handling this case. Should we do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we want to make sure that after the task is run, the osuser is properly assigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Thanks @rtibbles! I have updated the PR using the |
Hi @AlexVelezLl, when testing the setup flows between 2 Ubuntu VMs, everything is working correctly.
onmyown.webmLogs: onmyownlogs.zip and on-my-own-logcat.txt
Here are the Ubuntu server logs, in case you need those too: server-logs.zip |
Summary
Note: Welcome modal for LOD and on my own devices not appearing is not a regression from this PR, and its probably related to the same cause as #13071
References
Closes #12753
Reviewer guidance
Play with the setup wizard and check that the device is successfully provisioned for all its variants