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

Downgrade Aries JAX-RS Whiteboard from 2.0.1 to 2.0.0 #2599

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

wborn
Copy link
Member

@wborn wborn commented Dec 10, 2021

It causes unneccessary bundle refreshes whenever add-ons are installed/uninstalled.
As a result the UI does not get properly notified of installation changes.

Fixes #2580
Reverts the Aries JAX-RS Whiteboard upgrade of #2532

It causes unneccessary bundle refreshes whenever add-ons are installed/uninstalled.
As a result the UI does not get properly notified of installation changes.

Fixes openhab#2580
Reverts the Aries JAX-RS Whiteboard upgrade of openhab#2532

Signed-off-by: Wouter Born <[email protected]>
@J-N-K
Copy link
Member

J-N-K commented Dec 10, 2021

Just curious: how did you find that?

@wborn
Copy link
Member Author

wborn commented Dec 10, 2021

It looked very similar to an issue I fixed some time ago (#1709).

So I used the same command options to see what Karaf does when installing add-ons on a recent snapshot build:

openhab> feature:install -t -v openhab-binding-astro
Adding features: openhab-binding-astro/[3.2.0.SNAPSHOT,3.2.0.SNAPSHOT]
Changes to perform:
  Region: root
    Bundles to install:
      mvn:org.openhab.addons.bundles/org.openhab.binding.astro/3.2.0-SNAPSHOT
  Bundles to refresh:
    org.apache.aries.jax.rs.whiteboard/2.0.1 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.cxf.cxf-core/3.4.5 (Wired to org.apache.servicemix.bundles.saaj-impl/1.4.0.2 which is being refreshed)
    org.apache.cxf.cxf-rt-frontend-jaxrs/3.4.5 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.cxf.cxf-rt-rs-client/3.4.5 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.cxf.cxf-rt-rs-sse/3.4.5 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.cxf.cxf-rt-security/3.4.5 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.cxf.cxf-rt-transports-http/3.4.5 (Wired to org.apache.cxf.cxf-core/3.4.5 which is being refreshed)
    org.apache.servicemix.bundles.saaj-impl/1.4.0.2 (Should be wired to: org.jvnet.staxex.stax-ex/1.7.4 (through [org.apache.servicemix.bundles.saaj-impl/1.4.0.2] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.jvnet.staxex)(version>=1.7.0)(!(version>=2.0.0)))"))
    org.openhab.core.automation.rest/3.2.0.202112080308 (Wired to org.apache.aries.jax.rs.whiteboard/2.0.1 which is being refreshed)
    org.openhab.core.id/3.2.0.202112080304 (Wired to org.apache.aries.jax.rs.whiteboard/2.0.1 which is being refreshed)
    org.openhab.core.io.rest/3.2.0.202112080302 (Wired to org.apache.aries.jax.rs.whiteboard/2.0.1 which is being refreshed)
    org.openhab.core.io.rest.audio/3.2.0.202112080306 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.auth/3.2.0.202112080305 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.core/3.2.0.202112080308 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.sitemap/3.2.0.202112080310 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.sse/3.2.0.202112080306 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.swagger/3.2.0.202112080303 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.ui/3.2.0.202112080310 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.io.rest.voice/3.2.0.202112080307 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.core.ui.icon/3.2.0.202112080310 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.ui.basic/3.2.0.202112092106 (Wired to org.openhab.core.io.rest.sitemap/3.2.0.202112080310 which is being refreshed)
    org.openhab.ui.habpanel/3.2.0.202112092106 (Wired to org.openhab.core.io.rest/3.2.0.202112080302 which is being refreshed)
    org.openhab.ui.iconset.classic/3.2.0.202112092106 (Wired to org.openhab.core.ui.icon/3.2.0.202112080310 which is being refreshed)

As most refreshes seemed to be caused by CXF/Whiteboard bundle refreshes, I thought it would be a good idea to check the behavior using the milestone before and just after the CXF and Whiteboard upgrade. 3.2.0.M3 did not have the issue while 3.2.0.M4 did have the issue. So I tested downgrading the Whiteboard (first bundle in the refresh list, easiest change 😉) which seems to fix it:

openhab> feature:install -t -v openhab-binding-astro
Adding features: openhab-binding-astro/[3.2.0.SNAPSHOT,3.2.0.SNAPSHOT]
Changes to perform:
  Region: root
    Bundles to install:
      mvn:org.openhab.addons.bundles/org.openhab.binding.astro/3.2.0-SNAPSHOT

@J-N-K
Copy link
Member

J-N-K commented Dec 10, 2021

Thanks. I didn't know the -t -v options. Looks very useful.

@kaikreuzer kaikreuzer merged commit 0028a3c into openhab:main Dec 10, 2021
@kaikreuzer kaikreuzer added this to the 3.2 milestone Dec 10, 2021
@wborn wborn deleted the downgrade-whiteboard branch December 10, 2021 22:44
@wborn wborn added the dependencies Pull requests that update a dependency file label Dec 11, 2021
@ghys
Copy link
Member

ghys commented Dec 11, 2021

FWIW the previous add-on management UI pages (with the simple lists) was polling /rest/addons every few seconds to make sure the installation statuses of add-ons were current (because there were cases where installing certain add-ons would close SSE connections and the UI would miss the "add-on is installed/uninstalled" events). That was removed in the new "add-on store" UI though, notably because of #2581 - every call to /rest/addons makes a request to Discourse to retrieve the marketplace add-ons.

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
It causes unneccessary bundle refreshes whenever add-ons are installed/uninstalled.
As a result the UI does not get properly notified of installation changes.

Fixes openhab#2580
Reverts the Aries JAX-RS Whiteboard upgrade of openhab#2532

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 0028a3c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing Karaf Features not properly reported to UI
4 participants