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

Use org.jboss.spec.javax.annotation from core in place of javax.annotation #397

Merged
merged 3 commits into from
May 31, 2023

Conversation

khushbr
Copy link
Collaborator

@khushbr khushbr commented May 31, 2023

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
Side-effect of opensearch-project/OpenSearch#7604, this is causing JAR Hell when spinning up cluster with RCA present.

> Task :paBwcCluster#oldVersionClusterTask1 FAILED
Exec output and error:
| Output for ./bin/opensearch-plugin:-> Installing file:/Users/khushbr/.gradle/caches/modules-2/files-2.1/org.opensearch.plugin/performance-analyzer/2.8.0.0-SNAPSHOT/d2825b5a621d43f484f5028e9f31078ef0768270/performance-analyzer-2.8.0.0-SNAPSHOT.zip
| -> Downloading file:/Users/khushbr/.gradle/caches/modules-2/files-2.1/org.opensearch.plugin/performance-analyzer/2.8.0.0-SNAPSHOT/d2825b5a621d43f484f5028e9f31078ef0768270/performance-analyzer-2.8.0.0-SNAPSHOT.zip
| -> Failed installing file:/Users/khushbr/.gradle/caches/modules-2/files-2.1/org.opensearch.plugin/performance-analyzer/2.8.0.0-SNAPSHOT/d2825b5a621d43f484f5028e9f31078ef0768270/performance-analyzer-2.8.0.0-SNAPSHOT.zip
| -> Rolling back file:/Users/khushbr/.gradle/caches/modules-2/files-2.1/org.opensearch.plugin/performance-analyzer/2.8.0.0-SNAPSHOT/d2825b5a621d43f484f5028e9f31078ef0768270/performance-analyzer-2.8.0.0-SNAPSHOT.zip
| -> Rolled back file:/Users/khushbr/.gradle/caches/modules-2/files-2.1/org.opensearch.plugin/performance-analyzer/2.8.0.0-SNAPSHOT/d2825b5a621d43f484f5028e9f31078ef0768270/performance-analyzer-2.8.0.0-SNAPSHOT.zip
| Exception in thread "main" java.lang.IllegalStateException: failed to load plugin opensearch-performance-analyzer due to jar hell
|       at org.opensearch.plugins.PluginsService.checkBundleJarHell(PluginsService.java:681)
|       at org.opensearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:862)
|       at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:830)
|       at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:875)
|       at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:276)
|       at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:250)
|       at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
|       at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
|       at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
|       at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
|       at org.opensearch.cli.Command.main(Command.java:101)
|       at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
| Caused by: java.lang.IllegalStateException: jar hell!
| class: javax.annotation.sql.DataSourceDefinitions
| jar1: /Users/khushbr/Desktop/GITHUB/performance-analyzer/build/testclusters/paBwcCluster1-0/distro/2.8.0-ARCHIVE/lib/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
| jar2: /Users/khushbr/Desktop/GITHUB/performance-analyzer/build/testclusters/paBwcCluster1-0/distro/2.8.0-ARCHIVE/plugins/.installing-7513005115664575767/javax.annotation-api-1.3.2.jar
|       at org.opensearch.bootstrap.JarHell.checkClass(JarHell.java:316)
|       at org.opensearch.bootstrap.JarHell.checkJarHell(JarHell.java:215)

Describe the solution you are proposing
Use org.jboss.spec.javax.annotation from core in place of javax.annotation

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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.

khushbr and others added 3 commits May 30, 2023 15:28
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #397 (c05a84c) into main (55d857f) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head c05a84c differs from pull request most recent head b92c45f. Consider uploading reports for the commit b92c45f to get more accurate results

@@             Coverage Diff              @@
##               main     #397      +/-   ##
============================================
- Coverage     76.07%   76.04%   -0.03%     
+ Complexity     2595     2594       -1     
============================================
  Files           302      302              
  Lines         15414    15414              
  Branches       1216     1216              
============================================
- Hits          11726    11722       -4     
- Misses         3193     3197       +4     
  Partials        495      495              

see 3 files with indirect coverage changes

@khushbr khushbr merged commit 066509d into opensearch-project:main May 31, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 31, 2023
…ation (#397)

* Add SHA update for PA-Commons to gradle.yml

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

* Use org.jboss.spec.javax.annotation from core in place of javax.annotation

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

---------

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>
(cherry picked from commit 066509d)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 31, 2023
…ation (#397)

* Add SHA update for PA-Commons to gradle.yml

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

* Use org.jboss.spec.javax.annotation from core in place of javax.annotation

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

---------

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>
(cherry picked from commit 066509d)
ansjcy pushed a commit that referenced this pull request May 31, 2023
…ation (#397) (#398)

* Add SHA update for PA-Commons to gradle.yml

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

* Use org.jboss.spec.javax.annotation from core in place of javax.annotation

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

---------

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>
(cherry picked from commit 066509d)

Co-authored-by: Khushboo Rajput <59671881+khushbr@users.noreply.github.com>
ansjcy pushed a commit that referenced this pull request May 31, 2023
…ation (#397) (#399)

* Add SHA update for PA-Commons to gradle.yml

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

* Use org.jboss.spec.javax.annotation from core in place of javax.annotation

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>

---------

Signed-off-by: Khushboo Rajput <khushbr@amazon.com>
(cherry picked from commit 066509d)

Co-authored-by: Khushboo Rajput <59671881+khushbr@users.noreply.github.com>
@khushbr khushbr deleted the sha-update branch September 30, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants