Skip to content

[GSoC 2026] Kafka Streams runner: validatesRunner task; Create and Flatten suites green#39380

Open
junaiddshaukat wants to merge 3 commits into
apache:feat/18479-kafka-streams-runner-skeletonfrom
junaiddshaukat:feat/ks-validates-runner
Open

[GSoC 2026] Kafka Streams runner: validatesRunner task; Create and Flatten suites green#39380
junaiddshaukat wants to merge 3 commits into
apache:feat/18479-kafka-streams-runner-skeletonfrom
junaiddshaukat:feat/ks-validates-runner

Conversation

@junaiddshaukat

@junaiddshaukat junaiddshaukat commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the validatesRunner gradle task, running Beam's @ValidatesRunner tests (from the SDK core test jar) against TestKafkaStreamsRunner, category excludes for features the runner does not support yet (side inputs, state,
timers, TestStream, unbounded, SDF, ...) plus a sickbay list for known-failing tests. Part of #18479; this is the milestone the midterm pointed at.

Current results:

  • CreateTest: 5/5
  • FlattenTest: 13/13, 1 sickbayed (needs multi-output executable stages -- output-tag dispatch in the stage processor; follow-up)

Enabling the suite immediately caught three real bugs, fixed here:

  1. Impulse bootstrap topics are now per-transform. A pipeline can contain two
    Impulses (an empty Create plus the dummy branch PAssert adds
    internally), and Kafka Streams rejects registering the same topic on two
    source nodes.
    2.Flatten is no longer declared in knownUrns(). Declaring it native made
    TrivialNativeTransformExpander corrupt the fused graph of a multi-branch
    Flatten whose inputs come from composite expansions (the fuser's own
    validation failed with "consumed but never produced"). This one change fixed
    four failing tests. Mirrors the Flink runner, which keeps Read out of its
    known URNs for expander reasons.
  2. A Flatten of zero PCollections is rewritten before fusion into a primitive
    Read of a new EmptyBoundedSource. A zero-input Flatten is a root of the
    pipeline graph, and GreedyPipelineFuser only accepts Impulse or Read
    roots; an empty read has exactly the right semantics (no elements, then the
    terminal watermark) and reuses the existing Read translator.

Next: enabling the GroupByKey and ParDo suites and triaging their failures the same way, and a follow-up issue for multi-output executable stages.

…atten suites green

Adds the validatesRunner gradle task running Beam's @ValidatesRunner tests from
the SDK core test jar against TestKafkaStreamsRunner (category excludes for
unsupported features, plus a sickbay list). CreateTest passes 5/5 and
FlattenTest 13/13, with one test sickbayed pending multi-output executable
stages.

Enabling the suite forced three runner fixes:

- Impulse bootstrap topics are now per-transform: a pipeline can contain two
  Impulses (an empty Create plus the dummy branch PAssert adds), and Kafka
  Streams rejects registering one topic on two source nodes.
- Flatten is no longer in knownUrns(): declaring it native made
  TrivialNativeTransformExpander corrupt the fused graph of a multi-branch
  Flatten fed by composite expansions ("consumed but never produced" from the
  fuser's own validation). Mirrors the Flink runner keeping Read out of its
  known URNs for expander reasons.
- A Flatten of zero PCollections is rewritten before fusion into a primitive
  Read of a new EmptyBoundedSource: a zero-input Flatten is a root of the
  pipeline graph and GreedyPipelineFuser only accepts Impulse or Read roots,
  and an empty read has exactly the empty-PCollection semantics (no elements,
  then the terminal watermark).
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@junaiddshaukat

Copy link
Copy Markdown
Contributor Author

/gemini summary

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request enables the 'validatesRunner' test suite for the Kafka Streams runner, significantly improving the runner's validation capabilities. The changes address critical issues discovered during testing, specifically regarding how Impulse transforms register topics and how Flatten transforms are handled within the pipeline graph to avoid fusion errors.

Highlights

  • ValidatesRunner Task: Introduced a new 'validatesRunner' Gradle task to execute Beam's core test suite against the TestKafkaStreamsRunner, including a sickbay mechanism for known-failing tests.
  • Impulse Bootstrap Topics: Updated Impulse bootstrap topics to be unique per-transform, preventing Kafka Streams from rejecting topologies with multiple Impulse sources.
  • Flatten Transform Handling: Removed Flatten from known URNs to improve graph fusion and implemented a rewrite for zero-input Flattens into empty BoundedSources to ensure correct pipeline graph roots.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Activity
  • Pull request created by junaiddshaukat.
  • Gemini summary generation failed initially.
  • Author requested summary generation via '/gemini summary'.

@github-actions github-actions Bot added the build label Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@je-ik
je-ik self-requested a review July 19, 2026 08:46
The task previously ran the whole ValidatesRunner category, including suites
that have not been triaged yet (windowed GroupByKey, PAssert singleton views,
metric types beyond counters). Feature gaps like non-global windowing have no
JUnit category to exclude, so the task now declares the enabled test classes
explicitly -- CreateTest and FlattenTest -- and the list grows class by class
as runner support does.
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.

1 participant