-
-
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
Multiple bundles for Guava and Jetty #892
Comments
I can confirm. |
For Guava this might be due to installed bindings which depend on 3rd-Party libraries which in turn depend on different versions of Guava. Not much we can do about that. For jetty we should find out why this happens. |
Other bundles I see in double:
and
|
OkHttp is definitely due to external libraries. This can‘t be solved. Two REST bundles is wrong, IMO. |
I can confirm the multiple REST Interface, but only have one OkHttp (3.12.1). |
In fact, for REST Interface, this is only a naming problem because the bundles are different:
|
@openhab-5iver it depends on the installed bindings. The bundles are only installed when needed. |
For okhttp, that is fully clear for me:
|
I've created #893 for it. |
Wrt Jetty in two versions: @maggu2810 & @wborn, you recently discussed Jetty versions in the context of the Karaf update. Could this be related to Karaf bringing a different version than what our TP features define? |
In the long run it would be much simpler to depend on a Karaf feature that provides the Jetty bundles e.g. the standard Karaf |
We probably still need to update openhab-tp jetty version. For me with the Demo package installed the Guava 18 bundle is a dependency of the swagger bundles used by the REST Documentation:
|
The issue with the Jetty bundles is fixed on a local build when I update the |
No, we would no longer need to specify a Jetty version for our features at all, as we consume what Karaf or to be more precise, the used Jetty feature provides. |
No, I am already using 4.2.6.
Perhaps my comment above has not bean clear. Jetty Proxy has not been part of any feature repo (Karaf standard and Pax Web) that contains the other jetty bundles. So, if someone wants to use Jetty Proxy he needs to bundle the respective code in their bundles or install the Jetty Proxy bundle by a custom feature itself (so, create a custom feature). I requested on the Karaf mailaing list shortly after 4.2.6 has been released, if it would be possible to add that bundle to the existing Jetty features. It has been added and so no custom feature anymore needed. |
Any progress with Jetty in double? |
I don't think so. At least I was not aware of any contribution. |
Resolves the Jetty bundle duplicates as reported in openhab#892. Signed-off-by: Wouter Born <[email protected]>
Resolves the Jetty bundle duplicates as reported in #892. Signed-off-by: Wouter Born <[email protected]>
Probably to be closed now that #934 is merged ? |
@openhab-5iver Is your issue gone? |
Using S1645 (the latest distro from 2 days ago), I still see 2 guavas...
|
IO REST sitemap is using Google Guava here: |
Ok so that is ok like that with Guava ? |
It is at least known. If someone ever comes with another weak cache usage, I assume we are happy to drop that dependency. |
One more dependency (Jackson) with different version:
openhab-core/features/karaf/openhab-tp/src/main/feature/feature.xml Lines 252 to 254 in b6aae69
and some bindings like Chromecast: <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/2.9.8</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/2.9.8</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/2.9.8</bundle> See also https://github.com/openhab/openhab2-addons/search?l=XML&q=jackson-core |
We need to upgrade Jackson to 2.9.9 (see security advice). I guess that this is easy for the 2.9.x bundles but probably not for 2.4.5. |
Can we also use the same latest jackson 2.9.x with all add-ons (and osgiified bundles)? Syncing the versions would decrease downloads/disk space/KAR files/installation time and fix vulnerabilities. Although there's always the possibility something gets broken. There's probably also going to be a 2.9.10 release to address even more vulnerabilities. :-| The most recent Swagger versions also use Jackson 2.9.x so if we'd upgrade to that we may be able to remove Jackson 2.4.5 from core and also fix openhab/openhab-webui#96. But it's probably quite some work. |
A first step for simplification is to introduce a feature for Jackson provided by OHC which can be used in other repositories (like we did in #920 for JAXB and JAX-WS). |
@wborn, did you try whether the current swagger 1.5.8 works with jackson 2.9? The manifest specifies |
I haven't tested it but the swagger-core release notes state that they use Jackson 2.9.9 nowadays. |
@wborn Would that mean that all related issues such as openhab/openhab-webui#96 could be solved by upgrading swagger-core then? |
I think the REST Docs should work again when the Swagger bundles are updated. A full update may also depend on updating the com.eclipsesource.jaxrs.provider.swagger dependencies (see its MANIFEST.MF). Though that project seems to be no longer active. If we consider forking osgi-jax-rs-connector we might first want to see if we'd want to use/fix the OpenNMS fork. According to its documentation:
There's also a PR for updating Jersey to 2.25.1 in the original repository hstaudacher/osgi-jax-rs-connector#199. |
@wborn Wouldn't it make more sense to migrate to the JAX-RS Whiteboard Pattern and use something like that #739 (comment) |
That would be nice indeed if it all works. There's probably still a lot to be done before that PR can be merged. Another option could be to do a minor bugfix/fork where we just correct the manifest entries so we make sure the Swagger bundles don't start using the Jackson 2.9.x bundles. |
FTR: Jackson has been updated to version 2.9.10 in #1128. |
Are multiple guava bundles really an issue? Usually the import statements are |
Guava lib is huge, so we should definitely try to keep the number of versions low. |
I am running OH 2.5.1. I found 5 bindings depending on okhttp:
Do you think, it will be possible and a good idea to move all (except netatmo) to the same verison 3.12.5 ? |
As far as I can see there is nothing we can do in core in that regard ATM. We still have two versions of Guava (on my system 27/30), but since these are incompatible and are added because 3rd party code depends on them, we have to live with that. |
Resolves the Jetty bundle duplicates as reported in openhab#892. Signed-off-by: Wouter Born <[email protected]> GitOrigin-RevId: 657d63f
I'm seeing this in S1621...
The text was updated successfully, but these errors were encountered: