Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#31912] Fix bug in finalization for Prism & fix the Java bundle finalizing tests. #33493

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

lostluck
Copy link
Contributor

@lostluck lostluck commented Jan 3, 2025

Unblock two Java Bundle Finalization tests.

  • Fix potential for fused transforms to flip finalization state of a stage. If any transform requires finalization, then so does the entire stage.
  • Fix the tests themselves: They were making assumptions on bundle production outside of the needs of the tests.
    • Reduce the "attempts" count, since they should now play better with other runners as well.
  • Remove unnecessary impulse kick set for TestStream. This plays better with Side input validation.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@lostluck
Copy link
Contributor Author

lostluck commented Jan 3, 2025

R: @damondouglas

Copy link
Contributor

github-actions bot commented Jan 3, 2025

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

@lostluck lostluck requested a review from damondouglas January 3, 2025 23:26
@@ -142,10 +142,8 @@ func (ts *testStreamHandler) UpdateHold(em *ElementManager, newHold mtime.Time)
ts.currentHold = newHold
ss.watermarkHolds.Add(ts.currentHold, 1)

// kick the TestStream and Impulse stages too.
// kick the TestStream stage to ensure downstream watermark propagation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking question - What does 'kick' mean in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before I answer, what do you think it means?

Copy link
Contributor

Choose a reason for hiding this comment

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

'Kick' signals the element manager to integrate the intent of the testStreamHandler's watermark settings under test with related stages' watermark. In other words, if there are remaining elements in test stream, we prevent prematurely setting all the stages' output watermark to infinity. The underlying mechanism by which we signal i.e. 'kick' is to merge the testStreamHandler's ID to the element manager's changedStages property.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right.

Like when you kick a ball, or engage in percussive maintenance on any mechanical device, this "kick" gets the Element Manager moving again, by saying a stage needs to be evaluated, and as it says, to ensure downstream watermark propagation.

@lostluck lostluck merged commit a1df014 into apache:master Jan 6, 2025
28 checks passed
@lostluck lostluck deleted the finalizeFix branch January 6, 2025 19:08
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.01%. Comparing base (7800360) to head (cc57902).
Report is 25 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #33493      +/-   ##
============================================
- Coverage     59.02%   59.01%   -0.01%     
  Complexity     3185     3185              
============================================
  Files          1146     1146              
  Lines        176065   176046      -19     
  Branches       3368     3368              
============================================
- Hits         103917   103898      -19     
  Misses        68791    68791              
  Partials       3357     3357              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

stankiewicz pushed a commit to stankiewicz/beam that referenced this pull request Jan 16, 2025
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.

2 participants