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

Remove dependency on javax.annotation implementation as OpenSearch now has one. #2801

Merged

Conversation

Xtansia
Copy link
Contributor

@Xtansia Xtansia commented May 30, 2023

Description

Removes the dependency on jakarta.annotation an implementation of javax.annotation, as OpenSearch now itself takes a dependency on an implementation of javax.annotation.

  • Category: Bug fix
  • Why these changes are required? OpenSearch now has a dependency on an implementation of javax.annotation causing a JAR hell error when installing the plugin.
  • What is the old behavior before changes and new behavior after changes? install failed previously, now succeeds.

Also requires backporting to 2.x

Issues Resolved

Resolves #2799

Testing

Manual testing of repro steps in #2799 but using local build of plugin rather than published snapshot.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…w has one.

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #2801 (522672a) into main (a580dfc) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #2801   +/-   ##
=========================================
  Coverage     61.47%   61.48%           
+ Complexity     3403     3401    -2     
=========================================
  Files           266      266           
  Lines         18865    18865           
  Branches       3302     3302           
=========================================
+ Hits          11598    11599    +1     
+ Misses         5673     5669    -4     
- Partials       1594     1597    +3     

see 3 files with indirect coverage changes

@@ -346,7 +346,6 @@ task integrationTest(type: Test) {
check.dependsOn integrationTest

dependencies {
implementation 'jakarta.annotation:jakarta.annotation-api:1.3.5'
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's is right, it comes from the recent protobuf-related changes when the @Generated annotation was introduced, thanks @Xtansia

Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

Thank you @Xtansia! I also recently faced the jar hell issue and removed this line locally and was planning to raise a PR today. Thank you for taking care of it!

@cwperks cwperks added backport 2.x backport to 2.x branch backport 2.8 Backport to 2.8 branch labels May 30, 2023
@cwperks cwperks merged commit 9be79bd into opensearch-project:main May 30, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 30, 2023
…w has one. (#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 9be79bd)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 30, 2023
…w has one. (#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 9be79bd)
DarshitChanpura pushed a commit that referenced this pull request May 30, 2023
…w has one. (#2801) (#2803)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 9be79bd)

Co-authored-by: Thomas Farr <xtansia@xtansia.com>
@Xtansia Xtansia deleted the fix/javax-annotation-jar-hell branch May 31, 2023 00:10
RyanL1997 pushed a commit to RyanL1997/security that referenced this pull request Jun 9, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
MaciejMierzwa pushed a commit to MaciejMierzwa/security that referenced this pull request Jun 13, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com>
MaciejMierzwa pushed a commit to MaciejMierzwa/security that referenced this pull request Jun 13, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com>
RyanL1997 pushed a commit to RyanL1997/security that referenced this pull request Jun 13, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
samuelcostae pushed a commit to samuelcostae/security that referenced this pull request Jun 19, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
samuelcostae pushed a commit to samuelcostae/security that referenced this pull request Jun 19, 2023
…w has one. (opensearch-project#2801)

This resolves "JAR hell" issues when installing the plugin.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Sam <samuel.costa@eliatra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch backport 2.8 Backport to 2.8 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Installation fails due to JAR hell on OpenSearch 2.x & main
3 participants