Skip to content

Scope shared Java DataflowRunner perf test staging directories by UTC date - #41838

Draft
damccorm wants to merge 1 commit into
masterfrom
fix/daily-staging-location-java-perf-46573026947
Draft

damccorm wants to merge 1 commit into
masterfrom
fix/daily-staging-location-java-perf-46573026947

Conversation

@damccorm

@damccorm damccorm commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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

Scopes shared GCS staging directories used by Java DataflowRunner performance and load tests by UTC date (staging-<yyyy-MM-dd>), mirroring the TestDataflowRunner fix in #41258.

Observed Failures (2 in 7 days)

  1. PostCommit Java IO Performance Tests (run 46573026947, 2026-12-01) — both failing jobs hit the exact same four deleted content-hashed JARs (log4j-api-2.25.4, jspecify-1.0.0, google-api-services-dataflow-v1b3-rev20260503-2.0.0, animal-sniffer-annotations-1.27) in gs://dataflow-staging-us-central1-844138762903/temp/staging/:
  2. PerformanceTests Cdap (run 46193825128, 2026-11-28) (job 141130408288, build scan): CdapIOIT.testCdapIOReadsAndWritesCorrectlyInBatch (job 2026-11-28_14_02_28-6618033392493023304) failed 32s after submission with dozens of content-hashed third-party JARs swept from gs://dataflow-staging-us-central1-844138762903/temp/staging/.

Root Cause

  • Both gs://dataflow-staging-us-central1-844138762903 and gs://temp-storage-for-perf-tests have 14-day GCS object lifecycle Delete rules (age: 14).
  • Scope shared TestDataflowRunner staging directory by UTC date #41258 scoped shared TestDataflowRunner staging paths by UTC date (staging-<yyyy-MM-dd>), intentionally leaving production DataflowRunner and PackageUtil untouched.
  • Java performance and load tests invoke --runner=DataflowRunner directly without --stagingLocation, so unchanged content-addressed third-party JARs remain skipped by PackageUtil.alreadyStaged() until GCS sweeps them at day 14 — either between staging and Dataflow's pre-launch check or mid-job during worker autoscaling.

Fix

  • .github/workflows/beam_PostCommit_Java_IO_Performance_Tests.yml: Compute STAGING_LOCATION=gs://dataflow-staging-us-central1-844138762903/temp/staging-$(date -u +%Y-%m-%d) and pass -DbeamTestPipelineOptions=["--stagingLocation=..."] to both scheduled (which check out the latest release tag, whose DefaultPipelineLauncher.extractOptions already reads beamTestPipelineOptions) and triggered :it:* runs.
  • .github/actions/test-arguments-action/action.yml: For Java DataflowRunner invocations without an explicit --stagingLocation, append --stagingLocation=<base>/staging-<yyyy-MM-dd> derived from --tempLocation (preferred) or --tempRoot (used by cdap.txt and other Java perf option files). Preserves custom --stagingLocation values and leaves non-Java and non-Dataflow workflows unchanged.

Verification

  • Validated YAML syntax and exercised test-arguments-action Group arguments bash logic locally against cdap.txt, java_CoGBK_Dataflow_Batch_100b_Multiple_Keys.txt, Spark/Python option files, explicit --stagingLocation, and --tempLocation override ordering, plus verified JSON/shell quoting for beam_PostCommit_Java_IO_Performance_Tests.yml.
  • Triggered beam_PostCommit_Java_IO_Performance_Tests.yml and beam_PerformanceTests_Cdap.yml on this PR branch (beam_PreCommit_GHA.yml also runs automatically on push).

Verification

  • Triggered .github/workflows/beam_PostCommit_Java_IO_Performance_Tests.yml workflow run on branch: 46606962256

@damccorm damccorm added the test-failure-cleanup Automated test health and flake cleanup PRs label Dec 1, 2026
@damccorm

damccorm commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@github-actions github-actions Bot added build size/s S: 10-49 lines changed labels Dec 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR cleanly resolves GCS staging artifact expiration failures in Java DataflowRunner performance and load tests by scoping shared staging directories by UTC date (staging-<yyyy-MM-dd>), aligning with the earlier TestDataflowRunner fix in #41258. Both the test-arguments-action option parsing and the beam_PostCommit_Java_IO_Performance_Tests.yml pipeline option injection are well-structured and preserve existing behavior when custom staging locations or non-Dataflow runners are used.

🔍 General Feedback

  • In .github/actions/test-arguments-action/action.yml, deriving the staging base from --tempLocation with a fallback to --tempRoot accurately covers both standard Dataflow perf tests and IO IT option files (such as cdap.txt) that invoke DataflowRunner directly.
  • In .github/workflows/beam_PostCommit_Java_IO_Performance_Tests.yml, passing -DbeamTestPipelineOptions via $GITHUB_ENV works across both master and checked-out release tags via DefaultPipelineLauncher.extractOptions.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@damccorm damccorm added the ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review label Dec 1, 2026
@damccorm

damccorm commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing per updated test-health policy: PostCommit Java IO Performance Tests has only 2 master failure(s) in the past 7 days (minimum required is >= 3 failures in a 7-day window). Keeping the branch so this PR can be reopened if PostCommit Java IO Performance Tests reaches >= 3 failures in 7 days.

@damccorm damccorm closed this Dec 3, 2026
@damccorm

damccorm commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Reopening under the updated per-issue >= 3 failures in 7 days rule: this shared DataflowRunner staging-directory lifecycle-deletion failure occurred 4 times in the past 7 days (runs 46193825128, 46573026947, 46666077973, and 47125733698).

@damccorm damccorm reopened this Dec 3, 2026
@damccorm damccorm added ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review and removed ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review labels Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review size/s S: 10-49 lines changed test-failure-cleanup Automated test health and flake cleanup PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant