Skip to content

Conversation

mdegat01
Copy link
Contributor

Proposed change

Provides progress updates for addon installs, addon updates, Home Assistant updates and Supervisor updates. Really just an extension of #6102 to wrap up the reports we get from docker into a single progress number on these 4 jobs.

To reduce noise we are no longer reporting progress updates from all the individual layers over WS to HA. And the main job will only provide an update when the % has changed by at least 1.

The couple catches here are these:

  1. We assume (for now) that the docker pull is the entirety of the job. This isn't really true. There are a few steps around the actual image pull (some can be quite lengthy like making a backup). We can revisit this in a future PR if we want to be more accurate about progress
  2. We assume download and extract take equal time and everything else is negligible. Also not true but a decent guess. We can refine in future
  3. There may be other inaccuracies to iron out. But should still be a step forward

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to cli pull request:
  • Link to client library pull request:

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:

@mdegat01 mdegat01 added new-feature A new feature needs-core Pull request needs Home Assistant Core changes but none are linked labels Sep 17, 2025
@agners agners requested a review from Copilot September 18, 2025 08:42
Copy link
Contributor

@Copilot 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 extends progress reporting functionality to addon installs, addon updates, Home Assistant updates and Supervisor updates. It builds on existing Docker layer progress tracking by aggregating individual layer progress into a single overall progress percentage for these high-level operations.

Key changes include:

  • Modified job system to handle internal jobs that don't send WebSocket events to reduce noise
  • Updated Docker interface to aggregate layer progress into main job progress
  • Added progress tracking to addon, Home Assistant, and Supervisor update operations

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/docker/test_interface.py Removed detailed progress tracking tests and simplified to focus on exception handling
tests/api/test_supervisor.py Added test for supervisor update progress reporting via WebSocket events
tests/api/test_store.py Added tests for addon install/update progress reporting via WebSocket events
tests/api/test_homeassistant.py Added test for Home Assistant update progress reporting via WebSocket events
tests/addons/test_manager.py Updated test to include new progress_job_id parameter in install call
supervisor/supervisor.py Added Job decorator and progress tracking to supervisor update method
supervisor/jobs/init.py Modified job system to handle internal jobs and improved change notification logic
supervisor/homeassistant/core.py Added progress tracking to Home Assistant update with job completion at 100%
supervisor/docker/interface.py Enhanced Docker interface with layer progress aggregation and main job progress updates
supervisor/docker/addon.py Added progress_job_id parameter support to addon Docker operations
supervisor/addons/manager.py Added progress tracking to addon install/update operations with job completion
supervisor/addons/addon.py Added progress_job_id parameter to addon install/update methods

@mdegat01 mdegat01 force-pushed the install-update-progress-bar branch from 9ef8f69 to 041bd45 Compare September 18, 2025 14:38
@mdegat01
Copy link
Contributor Author

mdegat01 commented Sep 18, 2025

@agners breaking change because I marked docker_interface_install as internal or something else? Because only home assistant could be listening for that and we know it isn't right now.

I guess it does also hide it from the REST API though. Maybe that is fair, I really doubt anyone is listening considering how recently it is added. Would you prefer I change it so internal only affects what gets sent over WS and internal jobs still show up in the REST API? Or some kind of third state that's like "partially internal" (no WS messages but still in REST API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change cla-signed needs-core Pull request needs Home Assistant Core changes but none are linked new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants