Skip to content
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] Cannot uninstall bundles after post hast been removed #2576

Closed
J-N-K opened this issue Nov 24, 2021 · 4 comments · Fixed by #2607
Closed

[addonservices] Cannot uninstall bundles after post hast been removed #2576

J-N-K opened this issue Nov 24, 2021 · 4 comments · Fixed by #2607
Labels
bug An unexpected problem or unintended behavior of the Core PR pending

Comments

@J-N-K
Copy link
Member

J-N-K commented Nov 24, 2021

Bundles installed from marketplace cannot be uninstalled if the post in the forum has been deleted or marked as unpublished. They need to be deleted manually from the user data-folder.

The obvious solution to remove bundles where no addon provider can be found that supplies that addon might not be as good as it looks in the first place. If the forum is not available (due to forum issues or network issues on client side), all marketplace addons would be uninstalled, which is a bad idea.

Unfortunately I have no good idea, but would be willing to implement if someone comes upon with a solution.

@wborn
Copy link
Member

wborn commented Dec 5, 2021

It could for instance save the serialized org.openhab.core.addon.Addon info for each installed Marketplace add-on in a Storage (or file) and use that when the post goes missing or maturity changes.

@J-N-K
Copy link
Member Author

J-N-K commented Dec 5, 2021

So the list of addons provided by the CommunityMarketplaceAddonservice would be

  • entry from remote (i.e. the Discourse)
  • entry from local storage if present but nor on remote?

@wborn
Copy link
Member

wborn commented Dec 5, 2021

Yes and and probably also update the stored Addon info whenever new info is obtained.
It may also need some logic to be able to handle Addon field changes over time too. 😉

@J-N-K
Copy link
Member Author

J-N-K commented Dec 5, 2021

I disagree on the first one: The stored information of an installed addon should not change. It should be removed when the addon is uninstalled and re-written if it is installed again. Otherwise it might provide wrong information about the installed addon (e.g. version).

The second one is easier: If we don't use a Storage<Addon> but a Storage<String> and store the GSON serialized data of Addon, the correct transition can be handled in the deserialization.

@cweitkamp cweitkamp added bug An unexpected problem or unintended behavior of the Core PR pending labels Dec 29, 2021
@J-N-K J-N-K changed the title [marketplace] Cannot uninstall bundles after post hast been removed [addonservices] Cannot uninstall bundles after post hast been removed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core PR pending
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants