core/homeassistant/helpers
J. Nick Koston 01e66d6fb2
Improve handling of unrecoverable storage corruption (#96712)
* Improve handling of unrecoverable storage corruption

fixes #96574

If something in storage gets corrupted core can boot loop
or if its integration specific, the integration will fail to
start.

We now complainly loudly in the log, move away the corrupt data
and start fresh to allow startup to proceed so the user can
get to the UI and restore from backup without having to attach
a console (or otherwise login to the OS and manually modify files).

* test for corruption

* ensure OSError is still fatal

* one more case

* create an issue for corrupt storage

* fix key

* persist

* feedback

* feedback

* better to give the full path

* tweaks

* grammar

* add time

* feedback

* adjust

* try to get issue_domain from storage key

* coverage

* tweak wording some more
2023-07-19 09:23:12 +02:00
..
service_info Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
__init__.py Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
aiohttp_client.py Re-enable cleanup_closed on cpython >= 3.11.4 (#93120) 2023-05-15 21:29:41 +02:00
aiohttp_compat.py Restore original aiohttp cancelation behavior (#88046) 2023-02-13 22:00:36 -06:00
area_registry.py Remove deprecated async_get_registry (#91928) 2023-04-23 23:02:21 -04:00
check_config.py Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
collection.py Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026) 2023-06-22 03:33:23 +02:00
condition.py Allow conditions to be implemented in platforms (#88509) 2023-02-23 22:30:51 -05:00
config_entry_flow.py Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
config_entry_oauth2_flow.py Bump PyJWT to 2.7.0 (#93128) 2023-05-16 10:26:04 +02:00
config_validation.py Improve the docstring of some config schema generators (#96296) 2023-07-11 11:34:16 +02:00
data_entry_flow.py Store redirect URI in context instead of asking each time (#77380) 2022-08-29 19:28:42 -04:00
debounce.py Fix debouncer not scheduling timer when wrapped function raises (#94689) 2023-06-15 22:15:49 -04:00
deprecation.py Import `ParamSpec` from typing [Py310] (#86413) 2023-01-23 07:28:43 +01:00
device_registry.py Move device info validation to device registry (#96465) 2023-07-14 08:55:17 -04:00
discovery.py Add names to common helper tasks (#90803) 2023-04-05 08:41:15 +02:00
discovery_flow.py Fix benign typo in discovery flow helper (#90396) 2023-03-28 13:01:41 +02:00
dispatcher.py Pass a helpful name when creating common asyncio tasks in core (#89171) 2023-03-05 12:46:02 +01:00
entity.py Only load the device entry when it changes in the base entity (#95801) 2023-07-10 15:17:35 +02:00
entity_component.py Add service response data for listing calendar events (#94759) 2023-06-23 23:34:34 -04:00
entity_platform.py Move device info validation to device registry (#96465) 2023-07-14 08:55:17 -04:00
entity_registry.py Stable entity registry id when a deleted entity is restored (#77710) 2023-06-26 15:54:35 +02:00
entity_values.py Limit cache size of EntityValues (#94983) 2023-06-21 22:23:35 +02:00
entityfilter.py Reduce code in entity filter (#94882) 2023-06-21 08:37:19 +01:00
event.py Add missing callback decorator to event helpers (#94483) 2023-06-13 11:16:43 +02:00
frame.py String formatting and max line length - Part 7 (#84532) 2022-12-27 11:18:56 +01:00
httpx_client.py Tune httpx keep alives for polling integrations (#95782) 2023-07-03 14:21:59 -04:00
icon.py
instance_id.py Regenerate instance ID on error (#94898) 2023-06-20 11:16:51 +02:00
integration_platform.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
intent.py Update service call return values and error handling (#94657) 2023-06-16 07:01:40 -07:00
issue_registry.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
json.py Improve performance when serializing small bits of JSON (#93653) 2023-05-27 19:53:52 -04:00
location.py Code styling tweaks to core helpers (#85441) 2023-01-08 13:44:09 -10:00
network.py Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
ratelimit.py
recorder.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
reload.py Make EntityComponent generic (#78473) 2022-09-14 14:16:23 -04:00
restore_state.py Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 19:31:17 +02:00
schema_config_entry_flow.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
script.py Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
script_variables.py Move `disallow-any-generics` to mypy.ini (#63917) 2022-01-11 13:33:25 -08:00
selector.py Make default theme selectable for set theme service (#96849) 2023-07-18 17:36:35 +02:00
sensor.py Code styling tweaks to core helpers (#85441) 2023-01-08 13:44:09 -10:00
service.py Speed up single entity/response service calls (#96729) 2023-07-17 09:33:13 +02:00
signal.py Make hass.async_stop an untracked task (#88738) 2023-02-24 23:11:48 -05:00
significant_change.py Update Optional typing (1) [Py310] (#86417) 2023-01-23 09:56:10 +01:00
singleton.py Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
start.py Add at_started helper (#79577) 2022-10-05 12:24:51 +02:00
state.py Remove deprecated state.get_changed_since (#96579) 2023-07-18 09:42:48 +02:00
storage.py Improve handling of unrecoverable storage corruption (#96712) 2023-07-19 09:23:12 +02:00
sun.py Fix infinite loop in sun.sun (#89723) 2023-03-14 16:27:29 -10:00
system_info.py Ensure async_get_system_info does not fail if supervisor is unavailable (#96492) 2023-07-16 11:10:07 -04:00
temperature.py Use unit_conversion in components (#79204) 2022-09-28 16:05:31 +02:00
template.py Use slots for template RenderInfo (#93337) 2023-05-22 08:52:49 +02:00
template_entity.py Allow stopping a script with a response value (#95284) 2023-06-27 08:24:22 +02:00
trace.py Use slots in TraceElement (#95877) 2023-07-05 08:44:00 +02:00
translation.py Add support for service translations (#95984) 2023-07-11 15:52:12 +02:00
trigger.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
typing.py Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +02:00
update_coordinator.py Partial revert "Add TypeVar defaults for DataUpdateCoordinator (#95026)" (#95101) 2023-06-23 14:42:34 +02:00