J. Nick Koston
a35fa0e95a
Warn that the minimum SQLite version will change to 3.40.1 as of 2025.2 ( #104298 )
...
Co-authored-by: Robert Resch <robert@resch.dev>
2024-07-31 08:13:04 -05:00
Erik Montnemery
ea75c8864f
Remove support for live schema migration of old recorder databases ( #122399 )
...
* Remove support for live schema migration of old recorder databases
* Update test
2024-07-29 15:52:18 +02:00
Erik Montnemery
5467685bd8
Adjust warning message when recorder is doing offline migration ( #122509 )
...
* Adjust warning message when recorder is doing offline migration
* Address review comments
2024-07-29 11:38:36 +02:00
Erik Montnemery
efaf75f2e6
Rename recorder INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD ( #122758 )
2024-07-29 11:38:21 +02:00
Erik Montnemery
5dbd7684ce
Fail tests if recorder creates nested sessions ( #122579 )
...
* Fail tests if recorder creates nested sessions
* Adjust import order
* Move get_instance
2024-07-25 21:18:55 +02:00
Erik Montnemery
0c7ab2062f
Avoid creating nested sessions in recorder migration ( #122580 )
2024-07-25 15:44:48 +02:00
Erik Montnemery
c9f0fe3c5d
Rename recorder INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD ( #122511 )
2024-07-24 11:37:49 +02:00
Erik Montnemery
5d3c57ecfe
Freeze integration setup timeout for recorder during non-live migration ( #122431 )
2024-07-22 18:48:55 -05:00
Erik Montnemery
96de0a4c94
Correct off-by-one bug in recorder non live schema migration ( #122428 )
...
* Correct off-by-one bug in recorder non live schema migration
* Remove change from the future
2024-07-23 00:30:31 +02:00
Erik Montnemery
42716723e6
Register WS command recorder/info early ( #122425 )
2024-07-22 16:26:52 -05:00
Erik Montnemery
3df6b34a03
Split recorder and frontend bootstrap steps ( #122420 )
2024-07-22 23:07:49 +02:00
Erik Montnemery
3dc36cf068
Improve error handling when creating new SQLite database ( #122406 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-22 14:16:11 -05:00
Erik Montnemery
20fc5233a1
Add recorder data migrator class to clean up states table ( #122069 )
2024-07-22 13:04:01 -05:00
Erik Montnemery
76cd53a864
Improve error handling when recorder schema migration fails ( #122397 )
2024-07-22 18:55:12 +02:00
Erik Montnemery
b14e8d1609
Remove SchemaValidationStatus.valid ( #122394 )
2024-07-22 17:33:13 +02:00
Erik Montnemery
e8b88557ee
Refactor recorder schema migration ( #122372 )
...
* Refactor recorder schema migration
* Simplify
* Remove unused imports
* Refactor _migrate_schema according to review comments
* Add comment
2024-07-22 16:53:54 +02:00
Erik Montnemery
cbe94c4706
Fix typo in recorder persistent notification ( #122374 )
2024-07-22 12:02:17 +02:00
Erik Montnemery
2f47312eeb
Fix recorder setup hanging if non live schema migration fails ( #122242 )
2024-07-20 13:10:23 +02:00
Erik Montnemery
436a38c1d2
Revert "Fix recorder setup hanging if non live schema migration fails" ( #122232 )
2024-07-20 12:29:08 +02:00
Erik Montnemery
153b69c971
Fix recorder setup hanging if non live schema migration fails ( #122207 )
2024-07-20 11:17:40 +02:00
Erik Montnemery
6921e053e4
Move recorder data migration implementation to migrators ( #122045 )
2024-07-17 10:59:58 +02:00
Erik Montnemery
9970b7eece
Refactor recorder data migration ( #121009 )
...
* Refactor recorder data migration
* Fix stale docstrings
* Don't store a session object in BaseRunTimeMigration instances
* Simplify logic in EntityIDMigration.migration_done
* Fix tests
2024-07-16 21:50:19 +02:00
Erik Montnemery
a22e12dac9
Refactor function recorder.migration._apply_update ( #122023 )
...
* Refactor function recorder.migration._apply_update
* Remove _SchemaVersionMigrators dict
2024-07-16 20:28:03 +02:00
Erik Montnemery
d8440e809a
Avoid mutating database schema definitions during schema migration ( #122012 )
...
* Avoid mutating database schema definitions during schema migration
* Adjust test when using mysql
* Address review comment
2024-07-16 20:27:49 +02:00
Erik Montnemery
dbe68ca057
Minor adjustment of recorder migration ( #122020 )
2024-07-16 14:20:23 +02:00
J. Nick Koston
73f6e3c07b
Narrow sqlite database corruption check to ensure disk image is malformed ( #121947 )
...
* Narrow sqlite database corruption check to ensure disk image is malformed
The database corruption check would also replace the database when it
locked externally instead of only when its malformed.
This was discovered in https://github.com/home-assistant/core/issues/121909#issuecomment-2227409124
when a user did a manual index creation while HA was online
* tweak
* tweak
* fix
* fix
2024-07-14 23:23:07 +02:00
J. Nick Koston
19d2d023ab
Ensure states table rebuild still happens if the event_id index was removed ( #121938 )
...
* Ensure states table rebuild still happens if the event_id index was removed
If ix_states_event_id was removed by the foreign key still
exists, the states table would not get rebuilt. This should
not happen under normal circumstances and seems to only be
possible if the index was removed manually or Home
Assistant was restarted forcefully in the middle
of a previous migration from years ago.
* cover
* fix tests
* mysql wont allow at that point but thats ok as long as its gone at the end
2024-07-14 23:20:52 +02:00
J. Nick Koston
8a52ffb967
Use a listcomp for more history results ( #121830 )
2024-07-12 16:10:21 +02:00
J. Nick Koston
ebd50d327b
Log add/remove index complete at the same level as when it starts ( #121852 )
2024-07-12 15:54:38 +02:00
J. Nick Koston
43596f22a4
Fix recorder max backlog calculation being too small ( #121739 )
2024-07-11 09:09:35 +02:00
J. Nick Koston
c81d5a1ac2
Handle empty entity_id in the recorder filter ( #121681 )
...
fixes #111745
2024-07-10 09:53:38 -05:00
epenet
bff663b3c1
Improve type hints in recorder result_processor ( #121593 )
2024-07-09 21:12:03 +02:00
J. Nick Koston
89ffee9ad5
Update ulid-transform to 0.10.1 ( #121321 )
2024-07-05 14:07:39 -05:00
Erik Montnemery
6eeb70151d
Use BIGINT SQL type for ID columns ( #121025 )
2024-07-05 10:42:39 -05:00
Erik Montnemery
61f1c8d963
Fix leak of SQLAlchemy engine objects in recorder ( #121085 )
2024-07-03 12:17:52 -05:00
Erik Montnemery
e26b4554e6
Improve logic when retrying establishing database connection ( #121047 )
2024-07-03 16:22:21 +02:00
Erik Montnemery
a4d889e958
Remove BaseTableManager active attribute ( #121020 )
2024-07-02 18:29:12 -05:00
Erik Montnemery
5b39989869
Fix typo in post_schema_migration ( #121017 )
2024-07-02 15:52:54 +02:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) ( #120914 )
2024-07-01 11:51:51 +02:00
J. Nick Koston
c5804d362c
Remove legacy foreign key constraint from sqlite states table ( #120779 )
2024-06-29 07:50:53 -05:00
J. Nick Koston
852bb19223
Cleanup db_schema from_event constructors ( #120803 )
2024-06-29 07:49:16 -05:00
J. Nick Koston
0dfb5bd7d9
Fix unneeded dict values for MATCH_ALL recorder attrs exclude ( #120804 )
...
* Small cleanup to handling MATCH_ALL recorder attrs exclude
* Fix unneeded dict values for MATCH_ALL recorder attrs exclude
The exclude is a set so the dict values were not needed
* Fix unneeded dict values for MATCH_ALL recorder attrs exclude
The exclude is a set so the dict values were not needed
* Fix unneeded dict values for MATCH_ALL recorder attrs exclude
The exclude is a set so the dict values were not needed
2024-06-29 07:42:08 +02:00
J. Nick Koston
b03c10647e
Fix stale docstring in recorder queries ( #120763 )
2024-06-28 16:29:12 -05:00
Marc Mueller
b798d76706
Update mypy-dev to 1.11.0a9 ( #120289 )
2024-06-24 09:57:15 +02:00
G Johansson
753ab08b5e
Add capability to exclude all attributes from recording ( #119725 )
2024-06-22 19:30:28 +02:00
Marc Mueller
f0452e9ba0
Update mypy dev 1.11.0a8 ( #120032 )
2024-06-21 13:15:18 +02:00
dontinelli
0dd5391cd7
Add Siemes and Millisiemens as additional units of conductivity and enable conversion between conductivity units ( #118728 )
2024-06-21 11:10:15 +02:00
J. Nick Koston
a642454e6f
Bump sqlalchemy to 2.0.31 ( #119951 )
2024-06-19 08:09:04 +02:00
J. Nick Koston
9082dc2a79
Reduce recorder overhead when entity filter is empty ( #119631 )
2024-06-14 08:43:51 +02:00
Erik Montnemery
8c27214dc9
Use statistic tables' duration attribute instead of magic numbers ( #119356 )
2024-06-11 15:12:20 +02:00