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

   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
   Appends a random 8-character UUID suffix to the default `dockerTag` in 
`runners/google-cloud-dataflow-java/build.gradle` (and honors `-PdockerTag` 
when passed) so concurrent Dataflow Runner v2 matrix jobs never overwrite or 
prematurely delete each other's SDK container image tag in GCR.
   
   ## Root Cause
   `runners/google-cloud-dataflow-java/build.gradle` generated `dockerTag` with 
1-second timestamp resolution (`new Date().format('yyyyMMddHHmmss')`) and 
ignored `-PdockerTag`. When parallel matrix jobs (such as `java_version: ['17', 
'21', '25']` in `PostCommit Java Examples Dataflow V2 Java`) evaluated 
`build.gradle` during the same second, multiple matrix legs shared the exact 
same GCR tag.
   
   In https://github.com/apache/beam/actions/runs/44953222277, both `Java (17)` 
and `Java (21)` generated 
`us.gcr.io/apache-beam-testing/java-postcommit-it/java:20261121214729`:
   1. `Java (17)` overwrote `Java (21)`'s `:20261121214729` tag with a Java 17 
SDK harness container image, causing `Java (21)`'s 
`BigQuerySamplesIT.testTableIO` job (compiled with Java 21 bytecode) to crash 
with `SDK harness sdk-0-0 disconnected`.
   2. When `Java (21)` finished first at `22:12:50Z`, its 
`cleanUpDockerJavaImages` finalizer untagged and deleted `java:20261121214729` 
while `Java (17)` was still running, causing `Java (17)`'s 
`BigQuerySamplesIT.testTableIO` worker pods to fail image pull 
(`#error-syncing-pod`) and time out after 1 hour.
   
   ## Fix
   - Honor `project.findProperty('dockerTag')` (already passed by 
`beam_PostCommit_Java_Examples_Dataflow_V2.yml`) and default to `"${new 
Date().format('yyyyMMddHHmmss')}-${UUID.randomUUID().toString().substring(0, 
8)}"` so concurrent Gradle invocations always push and clean up isolated 
container tags.
   
   ### Verification
   - Triggered `beam_PostCommit_Java_Examples_Dataflow_V2_Java.yml` workflow 
run on branch: 
[`44966244172`](https://github.com/apache/beam/actions/runs/44966244172)
   


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