Conversation
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( |
frenck
left a comment
There was a problem hiding this comment.
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.
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.
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.
When will the arbitrary keyword arguments be used?
There was a problem hiding this comment.
for backup and whatever we decide to add in the future.
Breaking change
Proposed change
This adds a new
updateintegration 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: