Cancel config entry retry, platform retry, and polling at the stop event#49138
Conversation
|
Edit: nm, bad testing on my part. |
|
Things we still wait for fixed in #49140 |
|
Looks like we keep updating entities as well after the stop event since the interval listener isn't canceled |
|
We still send up waiting for the executor if there is a sync connect in progress on shutdown, but at least we won't be adding more of them |
|
Hmm... I wonder if we can abort the flow but probably not since its happening in the executor |
1526aa1 to
9c15bde
Compare
|
I need to do functional testing on this before merge so marking this as a draft |
|
Retest with it moved looks good |
| else: | ||
| self.state = ENTRY_STATE_SETUP_ERROR | ||
|
|
||
| async def async_shutdown(self) -> None: |
There was a problem hiding this comment.
Why should this be a coroutine function? We don't await inside.
There was a problem hiding this comment.
I made it a coroutine because I figured we would need to add more to it later (#49241) and it would end up being a coroutine anyways which would be a breaking change in the api I wanted to avoid in the future.
|
|
||
| await self._async_setup_platform(async_create_setup_task) | ||
|
|
||
| async def async_shutdown(self) -> None: |
Proposed change
The retries and polling would delay shutdown because the retry would start during phase 1 shutdown and create new tracked tasks.
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Checklist
black --fast 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..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: