If any stage timed out the setup of the components would
be cancelled instead of moving forward
fixes
```
2023-05-25 19:21:21.696 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Sun for sun
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 186, in _async_process_integration
await self.async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 248, in async_process_requirements
async with self.pip_lock:
File "/usr/local/lib/python3.10/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 114, in acquire
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 217, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 922, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
return await manager.async_get_integration_with_requirements(domain)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 207, in _async_process_integration
results = await asyncio.gather(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/sun/__init__.py", line 101, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, [Platform.SENSOR])
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1365, in async_forward_entry_setups
await asyncio.gather(
asyncio.exceptions.CancelledError
2023-05-25 19:21:21.714 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for hacs
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 186, in _async_process_integration
await self.async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 248, in async_process_requirements
async with self.pip_lock:
File "/usr/local/lib/python3.10/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 114, in acquire
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 217, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 922, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
return await manager.async_get_integration_with_requirements(domain)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 207, in _async_process_integration
results = await asyncio.gather(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hacs/__init__.py", line 226, in async_setup_entry
setup_result = await async_initialize_integration(hass=hass, config_entry=config_entry)
File "/config/custom_components/hacs/__init__.py", line 212, in async_initialize_integration
await async_try_startup()
File "/config/custom_components/hacs/__init__.py", line 199, in async_try_startup
startup_result = await async_startup()
File "/config/custom_components/hacs/__init__.py", line 177, in async_startup
await hass.config_entries.async_forward_entry_setups(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1365, in async_forward_entry_setups
await asyncio.gather(
asyncio.exceptions.CancelledError
2023-05-25 19:21:21.721 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Socket DB565A for flux_led
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 186, in _async_process_integration
await self.async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 248, in async_process_requirements
async with self.pip_lock:
File "/usr/local/lib/python3.10/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 114, in acquire
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 217, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 922, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
return await manager.async_get_integration_with_requirements(domain)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 207, in _async_process_integration
results = await asyncio.gather(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/flux_led/__init__.py", line 208, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, platforms)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1365, in async_forward_entry_setups
await asyncio.gather(
asyncio.exceptions.CancelledError
2023-05-25 19:21:21.728 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Addressable v3 5v 588EB7 for flux_led
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 186, in _async_process_integration
await self.async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 248, in async_process_requirements
async with self.pip_lock:
File "/usr/local/lib/python3.10/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 114, in acquire
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 217, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 922, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
return await manager.async_get_integration_with_requirements(domain)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
await self._async_process_integration(integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 207, in _async_process_integration
results = await asyncio.gather(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/flux_led/__init__.py", line 208, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, platforms)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1365, in async_forward_entry_setups
await asyncio.gather(
asyncio.exceptions.CancelledError
2023-05-25 19:21:21.731 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
The default behavior of these warnings is to go to stderr, which in
some setups goes easily unnoticed. For example in Docker based ones,
they end up only in the container logs, and not e.g. in the HA log.
Capture these to make them available in logs where other such messages
are, and to make them subject to filtering as usual.
https://docs.python.org/3/library/logging.html#logging.captureWarnings
* Do not wait
* Correct tests
* Manage after dependencies stage 1
* test bootstrap dependencies
* Assert log the dependenciy is waited for
* Improve docstrings
* Assert outside callback
* Patch async_get_integrations
* Revert changes made to snips integration
* Undo changes to mqtt_statestream
* Fix memory churn in state templates
The LRU for state templates was limited to 512 states. As soon
as it was exaused, system performance would tank as each template
that iterated all states would have to create and GC any state
> 512
* does it scale?
* avoid copy on all
* comment
* preen
* cover
* cover
* comments
* comments
* comments
* preen
* preen
* Adds a loader to enable jinja imports.
* Switch to in-memory
* Move loading custom_jinja off of the event loop
* Raise TemplateNotFound if template doesn't exist
* Fix docstring
* Adds a service to reload custom jinja
* Remove IO from test setup
* Improve coverage and small refactor
* Incorporate feedback and use .jinja extension
* Check the loaded sources in test.
* Incorporate PR feedback.
* Update homeassistant/helpers/template.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Allow configuring country and language in core config
* Add script for updating list of countries
* Use black for formatting
* Fix quoting
* Move country codes to a separate file
* Address review comments
* Add generated/countries.py
* Get default language from owner account
* Remove unused variable
* Add script to generate list of supported languages
* Add tests
* Fix stale docsring
* Use format_python_namespace
* Correct async_user_store
* Improve typing
* Fix with_store decorator
* Initialize language in core store migration
* Fix startup
* Tweak
* Apply suggestions from code review
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Update storage.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
Prime platform.uname cache at startup to fix blocking subprocess
- Multiple modules check platform.uname()[0] at startup which
does a blocking subprocess call. We can avoid this happening
in the eventloop and distrupting startup stability by priming
the cache ahead of time in the executor