-
-
Notifications
You must be signed in to change notification settings - Fork 33k
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
Don't start recorder if a database from the future is used #134467
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @emontnemery 👍
../Frenck
if schema_status.current_version > SCHEMA_VERSION: | ||
_LOGGER.error( | ||
"The database schema version %s is newer than the installed version of " | ||
"Home Assistant Core supports (%s), either upgrade Home Assistant Core " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to mention Core ?
"Home Assistant Core supports (%s), either upgrade Home Assistant Core " | |
"Home Assistant supports (%s), either upgrade Home Assistant " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, the database is tied to the core version, and we take care to talk about the Home Assistant Core version in other cases.
If this proves to create trouble for users, we can introduce the concept of minor database schema versions, where we allow using a future minor version. |
Yeah I like that approach. But let's go down that path when needed / it arrises. |
Proposed change
Don't start recorder if a database from the future is used
This prevents a migrated database to be used by a version of Home Assistant which does not support it.
Without this check, the database may end up in an undefined state after downgrade.
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: