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

Revert #764 to only use shadowjar publication #959

Merged

Conversation

peterzhuamazon
Copy link
Member

Description

Revert #764 to only use shadowjar publication.

ml used to publish a lot of unrelated content in jar, therefore this PR is created to only publish related classes:
#764

However, the added jars publication alongside shadow caused some race conditions, so the github actions task was switched back to using shadow, without removing jars publication in #764.
#779

The above race condition in gradle 7 is not observed clearly when building non-snapshot artifacts with scripts/build.sh but showing clear race conditions in gradle 8 after this PR:
#892

The initial fix to this issue in #957 is not correct as it switch from shadow to jars, the exact same error spawns the fix of github actions in #779, causing dependent plugin such as neural-search failed with this error:

* What went wrong:
Execution failed for task ':bundlePlugin'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not find org.opensearch:opensearch-ml-common:2.8.0.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/opensearch/opensearch-ml-common/2.8.0.0/opensearch-ml-common-2.8.0.0.pom
       - file:/usr/share/opensearch/.m2/repository/org/opensearch/opensearch-ml-common/2.8.0.0/opensearch-ml-common-2.8.0.0.pom
       - https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/opensearch-ml-common/2.8.0.0/opensearch-ml-common-2.8.0.0.pom
       - https://plugins.gradle.org/m2/org/opensearch/opensearch-ml-common/2.8.0.0/opensearch-ml-common-2.8.0.0.pom
     Required by:
         project : > org.opensearch:opensearch-ml-client:2.8.0.0

* Try:

> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org/

Plus, the issue observed in #764 has since been resolved by #796.

Therefore, the final fix to this issue is to remove the jars publication all together.

Issues Resolved

opensearch-project/opensearch-build#3434

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.

@peterzhuamazon peterzhuamazon self-assigned this Jun 3, 2023
@peterzhuamazon peterzhuamazon changed the title Test 2.8 shadow Revert #764 to only use shadowjar publication Jun 3, 2023
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #959 (91370a7) into 2.x (eb94584) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                2.x     #959   +/-   ##
=========================================
  Coverage     82.32%   82.32%           
  Complexity     1918     1918           
=========================================
  Files           149      149           
  Lines          7506     7506           
  Branches        750      750           
=========================================
  Hits           6179     6179           
  Misses          987      987           
  Partials        340      340           
Flag Coverage Δ
ml-commons 82.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@peterzhuamazon peterzhuamazon merged commit e6dabc0 into opensearch-project:2.x Jun 3, 2023
@peterzhuamazon peterzhuamazon deleted the test-2.8-shadow branch June 3, 2023 05:49
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 3, 2023
* Revert #764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit e6dabc0)
ylwu-amzn pushed a commit that referenced this pull request Jun 3, 2023
* Revert #764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit e6dabc0)

Co-authored-by: Peter Zhu <[email protected]>
zane-neo pushed a commit to zane-neo/ml-commons that referenced this pull request Aug 28, 2023
…search-project#959)

* Revert opensearch-project#764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
zane-neo added a commit that referenced this pull request Aug 28, 2023
* Revert #764 to only use shadowjar publication



* Restore changes



---------

Signed-off-by: Peter Zhu <[email protected]>
Co-authored-by: Peter Zhu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

3 participants