Skip to content

[3.4] Add explicit task dependency between build*Tar and build in distribution/archives/build.gradle#20281

Merged
cwperks merged 4 commits intoopensearch-project:3.4from
cwperks:task-dependency-3.4
Dec 19, 2025
Merged

[3.4] Add explicit task dependency between build*Tar and build in distribution/archives/build.gradle#20281
cwperks merged 4 commits intoopensearch-project:3.4from
cwperks:task-dependency-3.4

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Dec 17, 2025

Description

This PR resolves an issue seen on 3.5 increment here: #20276 (comment)

This is similar to #19634 where gradle used to have implicit task dependencies that now need to be defined explicitly.

Related Issues

Resolves #20276 (comment)

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

…ribution/archives/build.gradle

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks requested a review from a team as a code owner December 17, 2025 20:25
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@cwperks
Copy link
Member Author

cwperks commented Dec 17, 2025

@gaiksaya @andrross This will unblock the 3.5 version increment. It does not need to be released, its sufficient to have it in the 3.4 branch. I will likewise add the same change in the 3.5 increment PR.

@github-actions
Copy link
Contributor

❌ Gradle check result for f8d03fc: 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?

@cwperks
Copy link
Member Author

cwperks commented Dec 17, 2025

Need to figure out how to wire this up without introducing other issues.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
A problem was found with the configuration of task ':plugins:repository-hdfs:integTest' (type 'RestIntegTestTask').
  - Gradle detected a problem with the following location: '/var/jenkins/workspace/gradle-check/search/distribution/archives/integ-test-zip/build/install'.
    
    Reason: Task ':plugins:repository-hdfs:integTest' uses this output of task ':distribution:archives:integ-test-zip:installDist' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':distribution:archives:integ-test-zip:installDist' as an input of ':plugins:repository-hdfs:integTest'.
      2. Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':plugins:repository-hdfs:integTest' using Task#dependsOn.
      3. Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':plugins:repository-hdfs:integTest' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/9.2.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Declare task ':distribution:archives:integ-test-zip:installDist' as an input of ':plugins:repository-hdfs:integTest'
> Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':plugins:repository-hdfs:integTest' using Task#dependsOn
> Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':plugins:repository-hdfs:integTest' using Task#mustRunAfter
> Run with --scan to generate a Build Scan (powered by Develocity).
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem was found with the configuration of task ':rest-api-spec:yamlRestTest' (type 'RestIntegTestTask').
  - Gradle detected a problem with the following location: '/var/jenkins/workspace/gradle-check/search/distribution/archives/integ-test-zip/build/install'.
    
    Reason: Task ':rest-api-spec:yamlRestTest' uses this output of task ':distribution:archives:integ-test-zip:installDist' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':distribution:archives:integ-test-zip:installDist' as an input of ':rest-api-spec:yamlRestTest'.
      2. Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':rest-api-spec:yamlRestTest' using Task#dependsOn.
      3. Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':rest-api-spec:yamlRestTest' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/9.2.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Declare task ':distribution:archives:integ-test-zip:installDist' as an input of ':rest-api-spec:yamlRestTest'
> Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':rest-api-spec:yamlRestTest' using Task#dependsOn
> Declare an explicit dependency on ':distribution:archives:integ-test-zip:installDist' from ':rest-api-spec:yamlRestTest' using Task#mustRunAfter
> Run with --scan to generate a Build Scan (powered by Develocity).

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks changed the title [3.4] Add explicit task dependency between assemble and installDist in distribution/archives/build.gradle [3.4] Add explicit task dependency between build*Tar and build in distribution/archives/build.gradle Dec 17, 2025
@github-actions
Copy link
Contributor

✅ Gradle check result for 951fb7a: SUCCESS

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.26%. Comparing base (62c3bdc) to head (72d8d4f).
⚠️ Report is 2 commits behind head on 3.4.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.4   #20281      +/-   ##
============================================
- Coverage     73.29%   73.26%   -0.03%     
+ Complexity    71785    71721      -64     
============================================
  Files          5794     5794              
  Lines        328218   328218              
  Branches      47261    47261              
============================================
- Hits         240554   240460      -94     
- Misses        68384    68424      +40     
- Partials      19280    19334      +54     

☔ 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.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks
Copy link
Member Author

cwperks commented Dec 18, 2025

Had to add an additional step into the assemble step to free up space on the GH runners

@github-actions
Copy link
Contributor

❌ Gradle check result for 72d8d4f: 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?

@github-actions
Copy link
Contributor

❌ Gradle check result for 72d8d4f: 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?

@github-actions
Copy link
Contributor

✅ Gradle check result for 72d8d4f: SUCCESS

@cwperks cwperks merged commit e1833d6 into opensearch-project:3.4 Dec 19, 2025
32 of 36 checks passed
@cwperks cwperks mentioned this pull request Dec 19, 2025
3 tasks
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