Repository navigation
Phase 1: Merge Streaming ValidatesRunner jobs into a single job - #41000
Conversation
There was a problem hiding this comment.
📋 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-PstreamingTestBatchingGradle flag, provides a safe rollout path for streaming test batching. - One minor resource/lifecycle issue was noted around cancelling the background
CancelOnErrortask oncewaitUntilFinishexits.
💡 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(); |
There was a problem hiding this comment.
🟡 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.
|
Reminder, please take a look at this pr: @kennknowles @Abacn |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| if (text.contains("ZONE_RESOURCE_POOL_EXHAUSTED")) { | ||
| return true; | ||
| } | ||
| if (text.contains("Startup of the worker pool") && text.contains("failed to bring up")) { |
There was a problem hiding this comment.
As you already noted, this is fixed in parallel in #40952. Consider dedup the fix?
There was a problem hiding this comment.
testStreamingJobSurvivesRetryableInfrastructureError almost duplicates testRunStreamingJobThatSucceedsDespiteRetriableServiceError introduced in #40952, consider just remove this one
There was a problem hiding this comment.
removed duplicate test
No description provided.