-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Poll supervisor job state when creating or restoring a backup #136891
Conversation
Hey there @home-assistant/supervisor, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Do we need to update or add tests? |
Yes, it would be nice, but I'm not sure how to test it since it's a race. Do you think it's enough to check that the job info is called? |
I added tests for create and restore where the job status is done, and no events are fired from supervisor. I think that simulates the race the polling is supposed to avoid fairly well. |
* Poll supervisor job state when creating or restoring a backup * Update tests * Add tests for create and restore jobs finishing early
Proposed change
Poll supervisor job state when creating or restoring a backup
Without this, we would wait forever for backup or restore to finish if the backup job already completed once we subscribed to job events.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: