-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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
Add update integration #66552
Add update integration #66552
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( |
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 really dig this idea! Awesome!
However, I do think repurposing updater
is causing it to have a weird name for a platform. I feel like the update
platform is more consistent with our naming in general.
In the current schema of things, I would personally vote for removing the updater
platform (as the use is gone), and introducing the update
platform.
I'm fine with both |
) | ||
return | ||
|
||
manager.skip_update(msg["domain"], msg["identifier"], msg["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.
What if identifier or version is no longer valid ? We only validate domain. Would it help to drop domain_is_valid
and just raise some exception if something is off?
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.
Since we do not store updates anymore, that would mean that on each call info/update/skip we would need to gather all updates, then iterate over all updates for the domain to ensure the identifier and version are present.
That's expensive, and this I would say is a rare edge case, and if needed is something that the individual update platforms should handle, they get the identifier and version, and can raise or just return early if the update no longer exists.
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
domain: str, | ||
identifier: str, | ||
version: str, | ||
**kwargs: Any, |
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.
When will the arbitrary keyword arguments be used?
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.
for backup
and whatever we decide to add in the future.
Breaking change
Proposed change
This adds a new
update
integration that allows other integrations to provide an updater platform to present and perform updates.Similar to what we have for updates for supervisor (the hassio integration will migrate to this as well).
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: