-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
[addonservices] allow uninstalling of removed addons and fix other issues #2607
Conversation
ef2078c
to
287e920
Compare
I rebased after the nullness annotations have merged and also added all necessary parts for the Community Marketplace Addonservice. |
Jenkins failed unrelated in persistence tests. |
While I see the goal, I wanted to note that there is a way to have multiple sources for config admin configuration files (see multiple fileinstall configurations). Current design of openhab distro does not promote that forcing people to use I could miss something here. |
I am not sure I understand your point. We need to store the full representation of the |
My point is rather basic, why pulling in json and whole storage stuff, which adds just layers of complexity, instead of using config admin for that? |
No, we need a full set of information (id, title, description, version, doc link, image, etc.) to show the add-on in the market place. If it was a single information (like the name), I would agree. But as I said before: we need all (or nearly all) the information in the The problem is that this information is only available on the remote/cloud/whatever-you-call-it side. If the information is removed there (or not available), the add-on cannot be displayed in the UI, even if it is installed (and not uninstalled because of that). Therefore we need to store the information set for installed add-ons locally. This is different from the distribution add-ons, where this information can be derived from the Karaf feature. |
I see your point, however this makes your implementation more difficult to maintain, especially when remote contents change in more fields than you actually use for identification. |
No. It just requires a custom TypeAdapter for de-/serialization. Edit: Maybe I misread your comment. The identification is done by the For storage the openHAB representation of the add-on is used. This is independent of the source. The fields filled in that class depends on the source, though. |
I'll refactor common functionality to an abstract super class and add unit tests for that. |
@openhab/core-maintainers If the overall design is fine with you, I'll add the test promised in #2633. |
...marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java
Show resolved
Hide resolved
IMO this adds a pretty good coverage for the common part of the add-on services, including install/uninstall, remote/local only logic and storage. |
Is there anything blocking progress here? |
...marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
This is definitely the last time I rebase this PR. |
Signed-off-by: Jan N. Klug <github@klug.nrw>
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.
LGTM. Thanks for your work.
…sues (openhab#2607) * [addonservices] allow uninstalling of removed addons Signed-off-by: Jan N. Klug <github@klug.nrw> GitOrigin-RevId: c4e1b14
Fixes #2576
Fixes #2581
Fixes #2673
Fixes #2687
It stores a String representation of the addon in the storage service on installation and removes it when the addon is uninstalled. When compiling the list of available addons the information in the storage takes precedence over the information received from the remote so the displayed information (including version or links) stays correct for the installed addon.
@wborn WDYT? I can extend that for the other Addon-Service very quickly, so we can ship that with 3.2.0, which would be very beneficial for users.
Signed-off-by: Jan N. Klug jan.n.klug@rub.de