Skip to content

Conversation

@mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Oct 1, 2025

Proposed change

Remove deprecated fields from /supervisor/info API and deprecated options from /supervisor/options as all have been deprecated for more then 2 years and are not in the client library.

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:

@mdegat01 mdegat01 added missing-documentation Added to pull requests that needs a docs, but none is linked breaking-change refactor A code change that neither fixes a bug nor adds a feature labels Oct 1, 2025
@mdegat01 mdegat01 requested a review from agners October 1, 2025 21:03
@mdegat01 mdegat01 removed the missing-documentation Added to pull requests that needs a docs, but none is linked label Oct 1, 2025
@agners
Copy link
Member

agners commented Oct 2, 2025

It seems the addons field of the /supervisor/info API is still in use in the hassio integration:

https://github.com/home-assistant/core/blob/46bdb1f14c399842f3b9eeec0fc5b97b17be70a7/homeassistant/components/hassio/coordinator.py#L439

@agners agners marked this pull request as draft October 2, 2025 07:55
@mdegat01 mdegat01 force-pushed the remove-deprecated-info-fields branch from 4471241 to 7031a58 Compare October 2, 2025 17:48
@mdegat01 mdegat01 marked this pull request as ready for review October 2, 2025 17:49
@mdegat01
Copy link
Contributor Author

mdegat01 commented Oct 2, 2025

@agners good catch. I kept that field and removed the other two. Ironically that was the one field that wasn't even in the documentation let alone the python client.

Once we refactor the hassio integration to fully leverage the client library then we'll return and remove that one.

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, LGTM!

@agners agners marked this pull request as draft October 8, 2025 13:32
@agners
Copy link
Member

agners commented Oct 8, 2025

Actually, I asked Claude Code to check bashio, and it raised issues:

● Based on my analysis, there are potential issues with the Supervisor PR for bashio:

  Problems Found

  1. wait_boot field removal - bashio uses this in lib/supervisor.sh:249
    - Function bashio::supervisor.wait_boot() reads from .wait_boot field
    - Also POSTs to /supervisor/options with wait_boot parameter
  2. addons_repositories field removal - bashio uses this in lib/supervisor.sh:314
    - Function bashio::supervisor.addons_repositories() reads from .addons_repositories[] field
  3. addons field - Currently safe (temporarily kept in the PR)
    - Function bashio::supervisor.addons() at lib/supervisor.sh:306 reads from .addons[].slug
    - PR notes this field will remain until Home Assistant Core is refactored

  Affected Functions

  - bashio::supervisor.wait_boot() (lines 239-251)
  - bashio::supervisor.addons_repositories() (lines 312-315)

  These functions will break when the Supervisor PR is merged unless bashio is updated to use alternative endpoints or these fields are retained.

I guess we should first drop these fields from bashio 🤔

@mdegat01 mdegat01 marked this pull request as ready for review October 10, 2025 19:48
@mdegat01
Copy link
Contributor Author

mdegat01 commented Oct 10, 2025

@agners added a cli PR to remove support for wait_boot and addons_repositories options: home-assistant/cli#602

I'm not really sure what claude is talking about with the third one. I think its referring to how we populate the autocomplete for addons here:
https://github.com/home-assistant/cli/blob/b8d70e28abd758ad003c8a96d85cc278b2460ea5/cmd/addons.go#L45-L101

But that doesn't use the deprecated addons field from supervisor/info. It makes a proper call to /addons and uses the list from there which is the supported path for getting a list of installed addons.

@agners
Copy link
Member

agners commented Oct 13, 2025

I'm not really sure what claude is talking about with the third one. I think its referring to how we populate the autocomplete for addons here:

Claude is talking about bashio, not the CLI. Since bashio is quite widely used we probably should remove the functions using these deprecated fields before removing them from Supervisor.

@mdegat01
Copy link
Contributor Author

@agners ok I see what you're saying now. Unfortunately its not as simple as removing a few things though, looks like the bashio library is pretty out of date. It still isn't aware of the /store API at all and thinks calling /addons gives you everything. We changed that a long time ago at this point so there's going to be quite a few changes required here.

@mdegat01
Copy link
Contributor Author

@agners ok put up the PR for bashio: hassio-addons/bashio#176

@agners agners marked this pull request as draft October 23, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change cla-signed Hacktoberfest refactor A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop deprecated fields from Supervisor info API

3 participants