damccorm opened a new pull request, #41892:
URL: https://github.com/apache/beam/pull/41892

   Note: this PR was auto-generated by tooling. Before moving it out of draft, 
the author has done a full review of the PR, specifically evaluating it on the 
following criteria:
   
   - The PR is an appropriate fix for the issue (e.g. we're not changing a test 
to avoid a bug)
   - The PR is a simple fix to the issue (e.g. we're not adding infra when we 
could just modify a test)
   - The PR is not covering for other problems (e.g. if we're bumping timeouts, 
it is not because we're covering for a performance problem)
     
   Full details of the methodology of generation and review can be found here - 
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
   
   If you have concerns with the PR or with the underlying methodology used to 
generate this, please comment below - they will be addressed by the author not 
the tooling :)
   
   ## Summary
   
   Orders `:sdks:java:container:generateLicenseReport` with 
`mustRunAfter(project(':sdks:java:harness').tasks)` in 
`sdks/java/container/build.gradle` so it does not iterate 
`:sdks:java:harness`'s `ConfigurationContainer` (`configurations = ALL`) 
concurrently with `:sdks:java:harness` tasks under Gradle `--parallel`.
   
   ## Root Cause
   
   `Publish Beam SDK Snapshots` (`beam_Publish_Beam_SDK_Snapshots 
(java:container:pushAll)`) failed **twice in 6 days** with the exact same 
`java.util.ConcurrentModificationException` in 
`:sdks:java:container:generateLicenseReport`, both times milliseconds between 
`:sdks:java:harness:createCheckerFrameworkManifest` and 
`:sdks:java:harness:spotlessJava`:
   
   - [run 
47002108896](https://github.com/apache/beam/actions/runs/47002108896/job/143897255135)
 (`2026-12-03`, [build scan 
`4mgusfajomq26`](https://develocity.apache.org/s/4mgusfajomq26)):
     - `00:21:07.352Z` `> Task 
:sdks:java:harness:createCheckerFrameworkManifest`
     - `00:21:07.643Z` `> Task :sdks:java:container:generateLicenseReport 
FAILED` (`java.util.ConcurrentModificationException`)
     - `00:21:07.944Z` `> Task :sdks:java:harness:spotlessJava FROM-CACHE`
   - [run 
45915444677](https://github.com/apache/beam/actions/runs/45915444677/job/140233410983)
 (`2026-11-27`, [build scan 
`gjvkpwwxtr67k`](https://develocity.apache.org/s/gjvkpwwxtr67k)):
     - `00:15:32.481Z` `> Task 
:sdks:java:harness:createCheckerFrameworkManifest`
     - `00:15:32.689Z` `> Task :sdks:java:container:generateLicenseReport 
FAILED` (`java.util.ConcurrentModificationException`)
     - `00:15:32.872Z` `> Task :sdks:java:harness:spotlessJava`
   
   `sdks/java/container/build.gradle` configures 
`com.github.jk1.dependency-license-report` `1.16` with `projects = [project, 
project.rootProject.findProject(':sdks:java:harness')]` and `configurations = 
ALL`. Because `:sdks:java:container:generateLicenseReport` reads 
`:sdks:java:harness`'s configurations cross-project without holding 
`:sdks:java:harness`'s project execution lock (and without any ordering 
constraint relative to `:sdks:java:harness` tasks), Gradle `--parallel` 
schedules it right alongside `:sdks:java:harness` tasks that create/resolve 
configurations, throwing `ConcurrentModificationException`.
   
   ## Changes
   
   - `sdks/java/container/build.gradle`: add 
`mustRunAfter(project(':sdks:java:harness').tasks)` to 
`tasks.named('generateLicenseReport')`.
     - Uses `mustRunAfter` (not `dependsOn`), so standalone `./gradlew 
:sdks:java:container:generateLicenseReport` does not pull extra 
`:sdks:java:harness` tasks into the execution graph.
     - Preserves `configurations = ALL` so the generated license JSON output is 
completely unchanged.
     - No circular dependency: `:sdks:java:harness` has no references to 
`:sdks:java:container`, and `evaluationDependsOn(":sdks:java:harness")` is 
already declared on line 27.
     - Minimal critical-path impact: container builds already wait on 
`:sdks:java:harness:shadowJar` via `dockerDependency`.
   
   ### Recent Occurrences
   - **2 `master` workflow failures** in the last 7 days in `Publish Beam SDK 
Snapshots`: 
[`47002108896`](https://github.com/apache/beam/actions/runs/47002108896), 
[`45915444677`](https://github.com/apache/beam/actions/runs/45915444677).
   
   ## Local Validation
   
   - Verified `git diff --check`, 2-space indentation (no tabs), no trailing 
whitespace, and trailing newline in `sdks/java/container/build.gradle` 
(matching Spotless Groovy/Gradle rules).
   - Dispatched `.github/workflows/beam_PreCommit_Java_Examples_Dataflow.yml` 
(which executes `:sdks:java:harness:*`, 
`:sdks:java:container:generateLicenseReport`, and 
`:sdks:java:container:pullLicenses` in parallel with `-Pdocker-pull-licenses`) 
rather than `beam_Publish_Beam_SDK_Snapshots.yml` so verification does not 
overwrite the shared `gcr.io/apache-beam-testing/beam-sdk/...:2.79.0.dev` 
snapshot tags.
   
   ### Verification
   - Triggered `.github/workflows/beam_PreCommit_Java_Examples_Dataflow.yml` 
workflow run on branch: 
[`47018743222`](https://github.com/apache/beam/actions/runs/47018743222)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to