Skip to content

Conversation

@mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Sep 10, 2025

Proposed change

Supervisor continues to make persistent notifications rather then repairs for a small subset of issues. This no longer makes sense so remove this and make proper repairs for any we can.

The one exception is the security one targeted at people using custom components with Home Assistant <2021.1.5 because I don't think repairs existed then. Although I wonder if we really have to continue to leave this one around at this point? It's quite old.

In addition I changed the free space issue to stop suggesting to remove a full backup and bumped its lower limit to 2GB. I'm not sure if 2GB is enough either but its better then 1GB. And the "remove full backup" suggestion was always pretty odd and kind of the reason we didn't make this one into a repair already, people didn't like that. The repair will just link to our clear up storage guide

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints or add-on configuration are added/changed:

@agners
Copy link
Member

agners commented Sep 16, 2025

The one exception is the security one targeted at people using custom components with Home Assistant <2021.1.5 because I don't think repairs existed then. Although I wonder if we really have to continue to leave this one around at this point? It's quite old.

Let's remove it once #6148 is merged.

In addition I changed the free space issue to stop suggesting to remove a full backup and bumped its lower limit to 2GB. I'm not sure if 2GB is enough either but its better then 1GB. And the "remove full backup" suggestion was always pretty odd and kind of the reason we didn't make this one into a repair already, people didn't like that. The repair will just link to our clear up storage guide

At the time of writing, the x86-64 extracted image size (without layer sharing) 3.12GB, the layer sizes 651MB. In worst case, both are at the disk at the same time, so ideally we'd make sure that 4GB is available for a full Core update without any layer sharing. But with layer sharing, and unpacking while downloading we probably get away with quite a bit less.

In a quick test on aarch64 an update from 2025.9.1 to 2025.9.3 with 1.9GB disk space free worked. Looking at the image manifests shows that 112MB is shared, the rest is not shared (~547MB), so I'd expect that more than 2GB is required even in a good case 🤔 🤷 . Maybe Docker automatically does layer by layer in case storage gets tight 🤔 .

In the end, it's a bit a tradeoff preventing users from starting an update which anyway doesn't work, and being overly cautions. Since we have better error handling now, folks will learn when the update doesn't complete due to space issues. I think going with 2GB for now is fine.

Copy link
Member

@agners agners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, LGTM!

@agners agners requested a review from Copilot September 16, 2025 12:50
Copy link
Contributor

Copilot AI left a 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 migrates from persistent notifications to the repairs system for most supervisor issues, with the exception of one legacy security issue. The PR also updates the free space check to use a higher threshold and removes suggestions to delete full backups.

  • Removes persistent notification generation for most issue types (free space, pwned passwords) in favor of repairs
  • Updates free space threshold from 1GB to 2GB and simplifies the check logic
  • Retains persistent notification only for the security issue affecting Home Assistant versions below 2021.1.5

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
supervisor/resolution/notify.py Removes most notification logic, keeps only legacy security notification
supervisor/resolution/const.py Increases minimum free space threshold from 1GB to 2GB
supervisor/resolution/checks/free_space.py Simplifies free space check by removing backup deletion suggestions
tests/resolution/check/test_check_free_space.py Updates tests to reflect simplified free space logic
tests/resolution/check/test_check.py Updates disk usage mock values for new 2GB threshold
tests/jobs/test_job_decorator.py Updates disk usage mock values for new threshold
tests/store/test_store_manager.py Updates disk usage mock values for new threshold

@mdegat01 mdegat01 merged commit 01911a4 into main Sep 16, 2025
23 checks passed
@mdegat01 mdegat01 deleted the persistent-notification-repairs branch September 16, 2025 15:23
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert persistent notifications to repair issues

3 participants