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

Fix marketplace add-on services fail after upgrade #3572

Merged
merged 2 commits into from
May 13, 2023

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Apr 23, 2023

A format change in the database (related to the introduction of addon.xml) leads to a non-migrateable and permanent error that floods the log with exceptions and malfunctions.

If such an error is detected, the database is purged and an error logged.

Also reported on the forum several times.

A format change in the database (related to the introduction of addon.xml) leads to a non-migrateable and permanent error that floods the log with exceptions and malfunctions.

If such an error is detected, the database is purged and an error logged.

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Apr 23, 2023
@J-N-K J-N-K requested a review from a team as a code owner April 23, 2023 16:39
.forEach(addons::add);
} catch (JsonSyntaxException e) {
List.copyOf(installedAddonStorage.getKeys()).forEach(installedAddonStorage::remove);
logger.error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it would be useful to also log the removed entries?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K
Copy link
Member Author

J-N-K commented May 13, 2023

@kaikreuzer For better user-experience this should also be merged before M3.

@kaikreuzer kaikreuzer merged commit 55d6d21 into openhab:main May 13, 2023
@kaikreuzer kaikreuzer added this to the 4.0 milestone May 13, 2023
@J-N-K J-N-K deleted the bug-addonservices branch May 13, 2023 18:55
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* Fix marketplace add-on services fail after upgrade

A format change in the database (related to the introduction of addon.xml) leads to a non-migrateable and permanent error that floods the log with exceptions and malfunctions.

If such an error is detected, the database is purged and an error logged.

Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: 55d6d21
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants