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

Add Trigger_Never to Prepare features check #31472

Merged

Conversation

damondouglas
Copy link
Contributor

This PR addresses #31461 adding Never Trigger to the list of feature support checks in the Prepare Job context.

To validate this fix:

  1. Run Prism server.
./gradlew :runners:prism:runServer
  1. Execute :runners:portability:java:ulrLoopbackValidatesRunnerTests on Prism, filtering for org.apache.beam.sdk.testing.PAssertTest:
TEST=org.apache.beam.sdk.testing.PAssertTest
./gradlew :runners:portability:java:ulrLoopbackValidatesRunnerTests -PjobEndpoint=localhost:8073 --tests="$TEST"

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.

@@ -52,7 +52,6 @@ func TestUnimplemented(t *testing.T) {
{pipeline: primitives.TriggerAfterProcessingTime},
{pipeline: primitives.TriggerAfterSynchronizedProcessingTime},
{pipeline: primitives.TriggerElementCount},
{pipeline: primitives.TriggerNever},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is default, does it make sense to remove this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Tests removed from this list must be added to another test that expects them to pass. Otherwise we're opening a test regression gap for ourselves down the road.

So, if you're removing this because TestUnimplmented started to fail, then you must move it to the TestImplmenented list down below.

If this test didn't start to fail, then we should leave it here to show we aren't fully done work on TriggerNever.

Comment on lines +204 to +210
dt := &pipepb.Trigger{
Trigger: &pipepb.Trigger_Default_{},
}
nt := &pipepb.Trigger{
Trigger: &pipepb.Trigger_Never_{},
}
check("WindowingStrategy.Trigger", ws.GetTrigger().String(), dt.String(), nt.String())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original ws.GetTrigger() returns a *pipepb.Trigger which would have never passed == &pipepb.Trigger_Default{}. In order for the existing check to evaluate equality would have needed cmp.Equals. Checking the String() was easier and still achieves the desired outcome.

@damondouglas damondouglas marked this pull request as ready for review June 1, 2024 01:13
Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

R: @riteshghorse for label go.

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).

Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

Approved after the suggested change.

@damondouglas damondouglas merged commit fbe9427 into apache:master Jun 3, 2024
7 checks passed
@damondouglas damondouglas deleted the fix-prism-windowstrategy-trigger branch June 3, 2024 17:00
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