-
-
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
Improve marketplace add-on handling #4019
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It has been reported several times that add-ons were not properly installed / missing after an upgrade or the installation of incompatible add-ons resulted in broken installations. After an upgrade (or clean cache) the `AddonHandler`s try to re-install the add-ons from the download cache (`<userdata>/marketplace`). This happens without checking compatibility. This was needed before OH4, because the cache was the only source providing information about installed add-ons. This is now different, since we store the add-on information in a JSON database, so the UIDs of the add-ons are known. This PR changes improves the add-on services. It now 1. Reads the information about the installed add-ons from the database and sets the installation status based on information from the handlers. 2. Removes all add-ons that are not installed from the JSON database and remembers their UIDs. 3. Refreshes the remote add-on list (including check for compatibility if not disabled). 4. Tries installation of the add-ons remembered in step 2. Since incompatible add-ons are missing in the add-on list, their installation fails and a warning is logged. This PR is has two corresponding PR in openhab-distro and openhab-linuxpkg to ensure that the upgrade script and `openhab-cli` also clear the marketplace cache. Signed-off-by: Jan N. Klug <github@klug.nrw>
This was referenced Jan 5, 2024
wborn
approved these changes
Jan 14, 2024
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.
Great! This certainly helps preventing incompatiblity issues resulting from outdated Marketplace add-ons. 👍
wborn
added a commit
to wborn/openhab-docker
that referenced
this pull request
Jan 14, 2024
Related to openhab/openhab-core#4019 Signed-off-by: Wouter Born <github@maindrain.net>
wborn
added a commit
to openhab/openhab-docker
that referenced
this pull request
Jan 14, 2024
Related to openhab/openhab-core#4019 Signed-off-by: Wouter Born <github@maindrain.net>
cipianpascu
pushed a commit
to cipianpascu/openhab-core
that referenced
this pull request
Jan 17, 2024
It has been reported several times that add-ons were not properly installed / missing after an upgrade or the installation of incompatible add-ons resulted in broken installations. After an upgrade (or clean cache) the `AddonHandler`s try to re-install the add-ons from the download cache (`<userdata>/marketplace`). This happens without checking compatibility. This was needed before OH4, because the cache was the only source providing information about installed add-ons. This is now different, since we store the add-on information in a JSON database, so the UIDs of the add-ons are known. This PR changes improves the add-on services. It now 1. Reads the information about the installed add-ons from the database and sets the installation status based on information from the handlers. 2. Removes all add-ons that are not installed from the JSON database and remembers their UIDs. 3. Refreshes the remote add-on list (including check for compatibility if not disabled). 4. Tries installation of the add-ons remembered in step 2. Since incompatible add-ons are missing in the add-on list, their installation fails and a warning is logged. This PR is has two corresponding PR in openhab-distro and openhab-linuxpkg to ensure that the upgrade script and `openhab-cli` also clear the marketplace cache. Signed-off-by: Jan N. Klug <github@klug.nrw> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It has been reported several times that add-ons were not properly installed / missing after an upgrade or the installation of incompatible add-ons resulted in broken installations.
After an upgrade (or clean cache) the
AddonHandler
s try to re-install the add-ons from the download cache (<userdata>/marketplace
). This happens without checking compatibility. This was needed before OH4, because the cache was the only source providing information about installed add-ons. This is now different, since we store the add-on information in a JSON database, so the UIDs of the add-ons are known.This PR changes improves the add-on services. It now
This PR is has two corresponding PR in openhab-distro and openhab-linuxpkg to ensure that the upgrade script and
openhab-cli
also clear the marketplace cache.