-
Notifications
You must be signed in to change notification settings - Fork 750
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.
@@ -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)
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