Skip to content

[Backport 2.19] Bump shadow-gradle-plugin from 8.1.1 to 8.3.10 (#20569) - #20767

Merged
cwperks merged 1 commit into
opensearch-project:2.19from
andrross:backport/backport-20569-to-2.19
Mar 3, 2026
Merged

[Backport 2.19] Bump shadow-gradle-plugin from 8.1.1 to 8.3.10 (#20569)#20767
cwperks merged 1 commit into
opensearch-project:2.19from
andrross:backport/backport-20569-to-2.19

Conversation

@andrross

@andrross andrross commented Mar 2, 2026

Copy link
Copy Markdown
Member

(cherry picked from commit 6b557db)

Check List

  • Functionality includes testing.

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.

@andrross
andrross requested a review from a team as a code owner March 2, 2026 23:06
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit be3dd38)

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

API Change

The old approach used ShadowExtension.component(publication) to configure the shadow component for Maven publication. The new approach directly calls publication.from(project.getComponents().getByName("shadow")). This is a behavioral change - verify that the shadow component is always registered with the name "shadow" before this line is reached, otherwise it will throw a UnknownDomainObjectException at runtime.

publication.from(project.getComponents().getByName("shadow"));

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

❌ Gradle check result for 34cdd23: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

)

Signed-off-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 6b557db)
Signed-off-by: Andrew Ross <andrross@amazon.com>
@andrross
andrross force-pushed the backport/backport-20569-to-2.19 branch from 34cdd23 to be3dd38 Compare March 2, 2026 23:41
@andrross andrross changed the title [Backport 2.19] Bump shadow-gradle-plugin from 8.1.1 to 9.3.1 (#20569) [Backport 2.19] Bump shadow-gradle-plugin from 8.1.1 to 8.3.10 (#20569) Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit be3dd38

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Add null check for shadow component lookup

The getByName("shadow") call will throw an exception if the "shadow" component is
not found, rather than providing a meaningful error. Consider using
findByName("shadow") with a null check to handle the case where the component might
not be registered, providing a clearer error message.

buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java [105]

-publication.from(project.getComponents().getByName("shadow"));
+SoftwareComponent shadowComponent = project.getComponents().findByName("shadow");
+if (shadowComponent == null) {
+    throw new GradleException("Shadow component not found. Ensure the shadow plugin is applied correctly.");
+}
+publication.from(shadowComponent);
Suggestion importance[1-10]: 3

__

Why: While the suggestion is technically valid, the getByName call already occurs inside a withPlugin block that only executes when the shadow plugin is applied, making it very unlikely the "shadow" component would be missing. The added verbosity provides minimal practical benefit in this context.

Low

@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

✅ Gradle check result for be3dd38: SUCCESS

@codecov

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.92%. Comparing base (f915333) to head (be3dd38).
⚠️ Report is 14 commits behind head on 2.19.

Files with missing lines Patch % Lines
...main/java/org/opensearch/gradle/PublishPlugin.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               2.19   #20767      +/-   ##
============================================
- Coverage     71.97%   71.92%   -0.05%     
+ Complexity    65995    65978      -17     
============================================
  Files          5342     5342              
  Lines        307363   307362       -1     
  Branches      44857    44857              
============================================
- Hits         221211   221068     -143     
- Misses        67661    67817     +156     
+ Partials      18491    18477      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cwperks
cwperks merged commit b8900b5 into opensearch-project:2.19 Mar 3, 2026
49 of 59 checks passed
@andrross
andrross deleted the backport/backport-20569-to-2.19 branch March 3, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants