Skip to content

[Python] Finish AfterAny and AfterAll after their first firing - #41475

Open
jayyyyqwq wants to merge 2 commits into
apache:masterfrom
jayyyyqwq:fix/python-parallel-trigger-finish
Open

jayyyyqwq wants to merge 2 commits into
apache:masterfrom
jayyyyqwq:fix/python-parallel-trigger-finish

Conversation

@jayyyyqwq

@jayyyyqwq jayyyyqwq commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #21262.

AfterAny and AfterAll can fire without finishing when their children keep running. In AfterEach(AfterAny(Always(), Always()), AfterCount(2)), three elements arriving separately produce three panes, [a], [b], and [c]. The expected panes are [a] and [b, c]. Replacing AfterAny with AfterAll gives the same result.

I made both triggers finish after their first firing and updated their data-loss classification to match. The parallel trigger keeps OrFinally’s existing completion behavior. I also release the watermark hold on a final pane. The existing DirectRunner stall test exposed that hold when a trigger finished before the end of the window.

Both pane-sequence cases failed before the fix and passed after it. The full Python trigger test file passed with 106 tests, 18 skips, and 2 passing subtests. I also checked that OrFinally can still emit a pane before its final trigger fires.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 14:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn added as fallback since no labels match configuration
Backup reviewer: kennknowles (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

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

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @Abacn

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @shunping added as fallback since no labels match configuration
Backup reviewer: kennknowles (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

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)

@github-actions github-actions Bot added python core size/s S: 10-49 lines changed labels Dec 1, 2026
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.

Python AfterAny, AfterAll do not follow spec

2 participants