-
Notifications
You must be signed in to change notification settings - Fork 608
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
No update available if update cannot be installed on system #5133
Conversation
WalkthroughWalkthroughThe recent changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Addon
participant DataStore
User->>Addon: Check need_update
Addon->>DataStore: Fetch latest version
DataStore-->>Addon: Return latest version
Addon->>Addon: Validate availability with self._validate_availability
Addon-->>User: Return update status
sequenceDiagram
participant TestSuite
participant Addon
participant DataStore
participant AwesomeVersion
TestSuite->>Addon: Call need_update
Addon->>DataStore: Fetch latest version
DataStore-->>Addon: Return latest version
Addon->>AwesomeVersion: Compare versions
AwesomeVersion-->>Addon: Return comparison result
Addon-->>TestSuite: Return update status
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Ok so I just checked. After this PR if there is an update but it cannot be installed on the system then the frontend says nothing about it in the addon info panel. No update panel with the changelog or any info about there being a newer version, just doesn't acknowledge it. That's functional but it would be ideal if the frontend acknowledged that there was an update and said its not available on this system. Although it would need more info if we wanted to tell the user why there is no update (home assistant version, platform/machine not supported, etc.) |
In discussions, we kinda agreed that hiding it completely is not good UX either. Ideally, we'd have a flag to tell the UI that the update is there, but can't be applied. But this is missing for update entities in general. This wasn't really a user driven effort, and it doesn't seem a very important/urgent issue. So we decided to stay with status quo. |
Proposed change
If there is an update for the addon but it cannot be installed because the system does not meet the requirements for it, API should not specify that an update is available.
Note: This PR will have an immediate impact on the addons info panel in frontend as it looks to this field to determine when to show UI about the update. It will not affect core currently since core update entities are true any time latest version != current version. They have no current support for the concept that an update is out there but it can't be installed here.
Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints of add-on configuration are added/changed:
Summary by CodeRabbit
New Features
Tests