Skip to content

Phase 1: Merge Streaming ValidatesRunner jobs into a single job - #41000

Merged
reuvenlax merged 6 commits into
apache:masterfrom
reuvenlax:merge_streaming_validates_runner
Nov 18, 2026
Merged

reuvenlax merged 6 commits into
apache:masterfrom
reuvenlax:merge_streaming_validates_runner

Conversation

@reuvenlax

Copy link
Copy Markdown
Contributor

No description provided.

@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 extends TestDataflowRunner and DataflowTestBatchCoordinator to support batching bounded streaming ValidatesRunner tests, while distinguishing retryable worker-pool startup infrastructure errors from fatal pipeline errors. The design is well-reasoned, conservative in crediting streaming batch members only when the merged job terminates cleanly in DONE with verified PAssert counters, and accompanied by comprehensive unit tests.

🔍 General Feedback

  • The separation between retryable infrastructure errors and fatal errors in ErrorMonitorMessagesHandler, along with the opt-in -PstreamingTestBatching Gradle flag, provides a safe rollout path for streaming test batching.
  • One minor resource/lifecycle issue was noted around cancelling the background CancelOnError task once waitUntilFinish exits.

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

if (options.isStreaming()) {
options.getExecutorService().submit(new CancelOnError(job, messageHandler));
}
long startNanos = System.nanoTime();

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.

🟡 Medium: The Future<?> returned by submit(new CancelOnError(job, messageHandler)) is never cancelled when waitForMergedJobTermination (or waitForStreamingJobTermination) returns. Once job.waitUntilFinish(timeout, messageHandler) exits, nothing feeds new messages into messageHandler, so CancelOnError can no longer observe new errors. However, if the job is not in a terminal state (for example on POLLING_FAILED, where the coordinator intentionally leaves the job running and job.getState() returns State.UNKNOWN on repeated IOExceptions, or in unit tests with mocked State.RUNNING jobs), CancelOnError will continue looping and polling job.getState() every 3 seconds in the background on options.getExecutorService().

Consider capturing the Future<?> and cancelling it (cancelOnError.cancel(true)) in a finally block when the wait finishes.

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.

Sounds a valid edge case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@github-actions

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @kennknowles @Abacn

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.81%. Comparing base (7b12d2c) to head (086f06b).
⚠️ Report is 123 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #41000   +/-   ##
=========================================
  Coverage     58.81%   58.81%           
  Complexity     4769     4769           
=========================================
  Files          1461     1461           
  Lines        185316   185316           
  Branches       3585     3585           
=========================================
  Hits         109001   109001           
  Misses        72966    72966           
  Partials       3349     3349           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (text.contains("ZONE_RESOURCE_POOL_EXHAUSTED")) {
return true;
}
if (text.contains("Startup of the worker pool") && text.contains("failed to bring up")) {

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.

As you already noted, this is fixed in parallel in #40952. Consider dedup the fix?

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.

testStreamingJobSurvivesRetryableInfrastructureError almost duplicates testRunStreamingJobThatSucceedsDespiteRetriableServiceError introduced in #40952, consider just remove this one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed duplicate test

@Abacn Abacn 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.

Thanks!

@reuvenlax
reuvenlax merged commit 028a272 into apache:master Nov 18, 2026
22 of 23 checks passed
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.

2 participants