Skip to content

Make ValidatesRunner faster: Tune Dataflow ValidatesRunner configuration - #40323

Merged
reuvenlax merged 2 commits into
apache:masterfrom
reuvenlax:improve_test_tune_validates_runner
Sep 29, 2026
Merged

reuvenlax merged 2 commits into
apache:masterfrom
reuvenlax:improve_test_tune_validates_runner

Conversation

@reuvenlax

Copy link
Copy Markdown
Contributor

Set numWorkers=1 and lower diskSize. NB: We should decide whether this is ok, or whether we want to make sure that all our tests have at least 2 workers!

Exclude streaming-only tests (UsesTriggeredSideInputs, UsesUnboundedPCollections, UsesUnboundedSplittableParDo) from the legacy ValidatesRunner task. These tests already run in the streaming ValidatesRunner. Add missing UsesUnboundedPCollections annotations.

Remove @RunWith(Enclosed.class). This enables increased parallelism (followup PR).

"--region=${gcpRegion}",
"--tempRoot=${dataflowValidatesTempRoot}",
"--dataflowWorkerJar=${dataflowLegacyWorkerJar}",
"--numWorkers=1",

@Abacn Abacn Sep 28, 2026 •

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.

We should decide whether this is ok

We can trigger https://github.com/apache/beam/actions/workflows/beam_PostCommit_Java_ValidatesRunner_Dataflow.yml

manually by modifying '.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Dataflow.json' in the PR and push a commit

See https://github.com/apache/beam/blob/master/.github/workflows/README.md#running-workflows-manually

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.

It will work (I've triggered it on another PR). My question is whether it changes our test coverage since we won't have multi-worker parallelism.

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.

I think it's fine. Validate runner tests are almost have very few data and Dataflow spins up single worker.

UsesOrderedListState.class,
UsesOnWindowExpiration.class
UsesOnWindowExpiration.class,
UsesUnboundedPCollections.class

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we could have an undocumented service-side flag, or something SDK side, to reject pipelines that aren't in the expected batch/streaming mode. I know we were accidentally automatically upgrading and running streaming jobs in the batch suite before and this fixes it.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @ahmedabu98 for label java.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@github-actions
github-actions Bot requested a review from ahmedabu98 September 29, 2026 15:16
@kennknowles

Copy link
Copy Markdown
Member

R: @kennknowles
R: @Abacn

@github-actions

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

@reuvenlax
reuvenlax merged commit bb9d98a into apache:master Sep 29, 2026
25 checks passed
'org.apache.beam.sdk.testing.UsesBoundedTrieMetrics', // Dataflow QM as of now does not support returning back BoundedTrie in metric result.
]

def isValidatesRunnerTestClass = { FileTreeElement element ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Realizing that this particular helper function is a bit wonky. Like this is definitely a case where the LLM DGAF how it gets the job done, and it'll have comprehensibility issues down the line.

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.

3 participants