-
Notifications
You must be signed in to change notification settings - Fork 841
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
solves #768: Add OSGi support by exporting all java packages except internal packages #6669
base: main
Are you sure you want to change the base?
solves #768: Add OSGi support by exporting all java packages except internal packages #6669
Conversation
95bc17a
to
7745dc1
Compare
…kages except internal packages
7745dc1
to
ff2f9ca
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6669 +/- ##
============================================
- Coverage 90.07% 90.06% -0.02%
Complexity 6278 6278
============================================
Files 697 697
Lines 18951 18951
Branches 1858 1858
============================================
- Hits 17071 17068 -3
- Misses 1306 1307 +1
- Partials 574 576 +2 ☔ View full report in Codecov by Sentry. |
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.
Check out #4627 for a previous attempt at adding OSGi support.
As someone without OSGi experience, I think its important to add some sort of end-to-end integration test. A sample app built with OSGi which consumes these artifacts and demonstrates it works as intended.
@jack-berg @bdhoine and myself are from the same organization, that's why you see a similar PR in the other repo's ;) we need it there as well. Of course I don't mind adding an integration test / sample application at all, but I would like to see what the expected result is:
So what do you expect / propose? I will also join the Java SIG as mentioned in the linked github issue, so maybe it's best to combine the two discussion lists and continue the talk in the issue instead of having two separate discussions in the pr and the issue about the same topic at the same time. |
What's your confidence level that this would in fact ensure that OSGi support is valid? Have you tried building your branch locally and running your app? There was a comment on #4627 suggesting that some of our Class.forName usage would get in the way of OSGi.. an integration test seems like the surest way to know its going to behave like we think. We have to do something similar to ensure support for graal. Is there a lightweight way to do the same with OSGi? You mention that integration tests are inherently a little slower - how slow are we talking? We have precedent for running some fairly expensive but valuable tests as a part of our build, so could be worth it. |
So far I have tested it by wrapping all OpenTelemetry jars into one jar together and adding the correct manifest headers and then running it in an OSGi application, this was the most efficient way of doing it without having to lose too much time, but it becomes a hassle because I have to build my own wrapper every time when a new release comes out. That's the reason for making this PR. But thanks for pointing the issue out of the Class.forName, it will give issues when having all jars separate instead of one uber jar, without adding extra headers to fix it. The integration test will be perfect to point that out! The integration test will still be lightweight enough, just slower than a unit test. I'll try something out and come back with the results! |
Pull request to add OSGi support