Skip to content

Fix Dataflow Validate runner test flakiness for streaming tests - #40952

Merged
Abacn merged 1 commit into
apache:masterfrom
Abacn:fix-streaming-flake
Nov 3, 2026
Merged

Abacn merged 1 commit into
apache:masterfrom
Abacn:fix-streaming-flake

Conversation

@Abacn

@Abacn Abacn commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Even though stockout is a retryable error, current TestDataflowRunner fails the test immediately once SEVERE level job logs detected, causing streaming tests being much more flaky than the batch

After #40292, per-JVM test concurrency multiplied by 6x. While batch tests have pipelines merged into single Dataflow job, streaming doesn't, add additional pressure.

  • Fix TestDataflowRunner not tolerate transient stockout error in streaming

  • Reduce parallelism for streaming Dataflow validate runner tests

Even though stockout is a retryable error, current TestDataflowRunner fails
the test immediately once ERROR level job logs detected, causing streaming
tests being much more flaky than the batch

After apache#40292, per-JVM test concurrency multiplied by 6x. While batch tests
have pipelines merged into single Dataflow job, streaming doesn't, add additional
pressure.

* Fix TestDataflowRunner not tolerate transient stockout error in streaming

* Reduce parallelism for streaming Dataflow validate runner tests
@github-actions github-actions Bot added runners dataflow size/s S: 10-49 lines changed labels Nov 2, 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 reduces flakiness in Dataflow streaming ValidatesRunner tests by ignoring transient service errors (containing "The service will retry") in TestDataflowRunner.ErrorMonitorMessagesHandler and reducing the default per-JVM test thread concurrency for unbatched/streaming runs from 6 to 2. The changes are well-targeted, clear, and accompanied by unit test coverage.

🔍 General Feedback

  • The filtering of retriable JOB_MESSAGE_ERROR messages prevents premature cancellation of streaming jobs during transient worker startup issues (such as stockouts) while still preserving full visibility via MonitoringUtil.LoggingHandler and LOG.info.
  • Lowering default unbatched parallelThreads to 2 in build.gradle appropriately limits concurrent standalone streaming Dataflow jobs across test worker forks.

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

@Abacn

Abacn commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

R: @aIbrahiim

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@aIbrahiim

Copy link
Copy Markdown
Contributor

@Abacn looks good to me and this actually matches our investigation on the Streaming , TagEncodingV2, DataflowV2 workflows

@Abacn
Abacn merged commit 3fd91ba into apache:master Nov 3, 2026
20 of 21 checks passed
@Abacn
Abacn deleted the fix-streaming-flake branch November 3, 2026 00:35
@reuvenlax

Copy link
Copy Markdown
Contributor

I have an identical PR that I got delayed in sending out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dataflow runners size/s S: 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants