Skip to content

[#36841] Spark 4 streaming: ValidatesRunner suite for the Structured Streaming runner - #40967

Merged
Abacn merged 2 commits into
apache:masterfrom
tkaymak:spark4-streaming-slice5d2-vr
Nov 4, 2026
Merged

Abacn merged 2 commits into
apache:masterfrom
tkaymak:spark4-streaming-slice5d2-vr

Conversation

@tkaymak

@tkaymak tkaymak commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of #36841.

This adds the streaming ValidatesRunner suite for the Spark 4 Structured Streaming runner, :runners:spark:4:validatesStructuredStreamingRunnerStreaming. It runs as part of :runners:spark:4:validatesRunner, so beam_PostCommit_Java_ValidatesRunner_Spark4 covers it. The suite runs with --streaming and stops each pipeline after 5 idle batches. The batch and streaming tasks now share one setup in spark_runner.gradle, the effective configuration of the batch task on Spark 3 and 4 is unchanged.

In streaming mode, a Flatten of no inputs is replaced by EmptyFlattenAsCreateFactory, as Dataflow does. It has to come before the Impulse override from #40766, because the replacement expands to an Impulse.

Exclusions are by category where one exists, grouped by the runner gap. Tests that fail on a gap without a category are excluded by name and cite their issue: ParDo with additional outputs #40949, Redistribute #40950, merging windows, side inputs and splittable DoFn under #36841, bounded source metrics under #32021.

Locally the suite passes with 191 tests, 0 failures and 8 skipped in about 22 minutes. Four Flatten and multiple apply tests that were excluded before now pass with the empty Flatten override and #40932. Full :runners:spark:4:test and :runners:spark:3:test pass. The Spark 4 ValidatesRunner trigger file runs it on this PR.

The CHANGES.md entry for Spark 4 streaming follows once this is approved.

@tkaymak

tkaymak commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

R: @Abacn

@github-actions github-actions Bot added build runners spark size/m M: 50-249 lines changed labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 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

@Abacn

Abacn commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Let's use the existing https://github.com/apache/beam/blob/master/.github/workflows/beam_PostCommit_Java_ValidatesRunner_Spark4.yml since the tests are fast, most of the time spend on build

that is add the structured-streaming streaming task to here if spark major version is 4:

dependsOn validatesRunnerStreaming

with:
persist-credentials: false
- name: Setup repository
uses: ./.github/actions/setup-action
- name: Setup repository
uses: ./.github/actions/setup-action
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: '17'
- name: run validatesStructuredStreamingRunnerStreaming script
uses: ./.github/actions/gradle-command-self-hosted-action
@tkaymak

tkaymak commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, done in 65c3494. The streaming task now runs from validatesRunner when the Spark major version is 4, the separate workflow is removed and the Spark 4 ValidatesRunner trigger file is bumped so it runs here.

@github-actions github-actions Bot removed the build label Nov 3, 2026

@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!

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

Labels

runners size/m M: 50-249 lines changed spark

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants