-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add Trigger_Never to Prepare features check #31472
Conversation
@@ -52,7 +52,6 @@ func TestUnimplemented(t *testing.T) { | |||
{pipeline: primitives.TriggerAfterProcessingTime}, | |||
{pipeline: primitives.TriggerAfterSynchronizedProcessingTime}, | |||
{pipeline: primitives.TriggerElementCount}, | |||
{pipeline: primitives.TriggerNever}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
dt := &pipepb.Trigger{ | ||
Trigger: &pipepb.Trigger_Default_{}, | ||
} | ||
nt := &pipepb.Trigger{ | ||
Trigger: &pipepb.Trigger_Never_{}, | ||
} | ||
check("WindowingStrategy.Trigger", ws.GetTrigger().String(), dt.String(), nt.String()) |
There was a problem hiding this comment.
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.
Assigning reviewers. If you would like to opt out of this review, comment R: @riteshghorse for label go. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
There was a problem hiding this 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.
This PR addresses #31461 adding Never Trigger to the list of feature support checks in the Prepare Job context.
To validate this fix:
:runners:portability:java:ulrLoopbackValidatesRunnerTests
on Prism, filtering fororg.apache.beam.sdk.testing.PAssertTest
:Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.