-
Notifications
You must be signed in to change notification settings - Fork 740
Check Core version and raise unsupported if older than 2 years #6148
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
Conversation
4793119
to
71a4cfc
Compare
We have a generic fallback for unknown unsupported reasons. With that, Home Assistant Core versions newer than 2022.12.0 will display the following message: ![]() The "More info" link points to https://www.home-assistant.io/more-info/unsupported/core_version. |
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 guess the code suggestion for EvaluateCoreVersion
is more of a nitpick but I do think the code is a bit unnecessarily complex, unless there's something I'm missing.
I do really think we should refer to what we call core as "Home Assistant" in any place that is user facing though.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
fb782fe
to
c4cedda
Compare
Check the currently installed Core version relative to the current date, and if its older than 2 years, mark the system unsupported. Also add a Job condition to prevent automatic refreshing of the update information in this case.
Also align handling between OS and Core version evaluations.
Block execution of fetch_data and store reload jobs if the core version is unsupported. This essentially freezes the installation until the user takes action and updates the Core version to a supported one.
Instead of using current date to determine if Core version is more than 2 years old, use the latest known Core version as reference point and check if current version is more than 24 releases behind. This is crucial because when update information refresh is disabled due to unsupported Core version, using date would create a permanent unsupported state. Even if users update to the last known version in 4+ years, the system would remain unsupported. By using latest known version as reference, updating Core to the last known version makes the system supported again, allowing update information refresh to resume. This ensures users can always escape the unsupported state by updating to the last known Core version, maintaining the update refresh cycle.
Avoid any ambiguity in what is exactly outdated/unsupported by using Home Assistant Core instead of just Core.
c4cedda
to
1286921
Compare
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.
Tested on latest dev OS with Supervisor from this branch, with Core 2023.8.1:
After clicking the update, the notification is cleared:
2025-09-17 11:59:59.904 INFO (MainThread) [supervisor.docker.interface] Updating image ghcr.io/home-assistant/qemux86-64-homeassistant:2023.8.1 to ghcr.io/home-assistant/qemux86-64-homeassistant:2025.9.3
2025-09-17 11:59:59.904 INFO (MainThread) [supervisor.docker.interface] Downloading docker image ghcr.io/home-assistant/qemux86-64-homeassistant with tag 2025.9.3.
2025-09-17 12:00:43.629 INFO (SyncWorker_1) [supervisor.docker.manager] Stopping homeassistant application
2025-09-17 12:00:49.032 INFO (SyncWorker_1) [supervisor.docker.manager] Cleaning homeassistant application
2025-09-17 12:00:49.047 INFO (MainThread) [supervisor.homeassistant.module] Update pulse/client.config: /data/tmp/homeassistant_pulse
2025-09-17 12:00:49.107 INFO (MainThread) [supervisor.docker.homeassistant] Starting Home Assistant ghcr.io/home-assistant/qemux86-64-homeassistant with version 2025.9.3
2025-09-17 12:00:49.107 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
2025-09-17 12:00:51.380 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2025-09-17 12:00:51.398 INFO (MainThread) [supervisor.resolution.evaluations.base] Clearing home_assistant_core_version as reason for unsupported
Add-on repos can't be indeed added:

Update data is still correctly fetched if missing or old on Supervisor restart, so nothing currently prevents from updating to the latest Core.
What's still missing is the docs - this link returns 404 and I don't see an open PR for it: https://www.home-assistant.io/more-info/unsupported/home_assistant_core_version
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.
Pull Request Overview
This PR implements a Home Assistant Core version check that marks the system as unsupported if the currently installed Core version is more than 2 years old compared to the latest known version. It also prevents automatic refreshing of update information when Core is unsupported.
Key changes:
- Add Core version evaluation to mark systems with 2+ year old versions as unsupported
- Block update fetching and store reloading when Core version is unsupported
- Use latest known Core version as reference instead of current date to enable recovery after updates
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
supervisor/resolution/evaluations/home_assistant_core_version.py |
New evaluation class to check Core version age against 2-year threshold |
supervisor/resolution/const.py |
Add HOME_ASSISTANT_CORE_VERSION unsupported reason enum |
supervisor/jobs/const.py |
Add HOME_ASSISTANT_CORE_SUPPORTED job condition |
supervisor/jobs/decorator.py |
Add condition check for Core version support in job execution |
supervisor/updater.py |
Block updater data fetching when Core version is unsupported |
supervisor/store/__init__.py |
Block store reloading and updating when Core version is unsupported |
supervisor/misc/tasks.py |
Block store reload task when Core version is unsupported |
tests/resolution/evaluation/test_evaluate_home_assistant_core_version.py |
Comprehensive test coverage for Core version evaluation logic |
tests/jobs/test_job_decorator.py |
Test Core supported job condition functionality |
supervisor/resolution/evaluations/os_version.py |
Add debug logging for version parsing errors to match Core version implementation |
tests/resolution/evaluation/test_evaluate_home_assistant_core_version.py
Outdated
Show resolved
Hide resolved
…version.py Co-authored-by: Copilot <[email protected]>
I've double checked the behavior on restart since comment at home-assistant/home-assistant.io#40914 (comment) got me worried: When the Supervisor fetches the update data
On Updater startup, we Maybe your local updater information was missing the board information? This changed with #6152 shipped in Supervisor 2025.9.0 though which is on stable channel 🤔 |
From @sairon's run:
It seems that the evaluation during setup did not consider the system as unsupported. The only reason I can think of is if the updater data still contained an old Core version at that point, so the Supervisor just learned after the fetch about a newer Core version and marked Core unsupported during the later reevaluation. I've tested the current code on a second system, and for me the evaluation during setup worked fine. Let's merge this PR and do some more testing during dev/beta. |
Proposed change
Check the currently installed Core version relative to the last known Core version and if its older than 2 years, mark the system unsupported. Also add a Job condition to prevent automatic refreshing of the update information in this case. We use it to block fetching the version json as well as updating and adding add-on repositories.
Using current Core version as reference to mark the system unsupported is necessary so that an update of Core will mark the system as supported again, such that Supervisor will refresh the update information again. If we were to take the current date as a reference, then 2 years after a Core version of an installation gets declared unsupported, we'd only offer an update to the then newest known Core version, which would be 2 years old already and hence the system would remain unsupported.
Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints or add-on configuration are added/changed: