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 tests for processing time continuation trigger #16840

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

kennknowles
Copy link
Member

I noticed there were no explicit tests for this configuration to ensure that a runner does allow output of a processing time trigger to flow through the pipeline.


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • 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.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status Build Status Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status ---
XLang Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@github-actions github-actions bot added the java label Feb 12, 2022
@kennknowles
Copy link
Member Author

R: @scwhittle

Copy link
Contributor

@scwhittle scwhittle left a comment

Choose a reason for hiding this comment

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

LGTM w/ comments

import org.apache.beam.sdk.transforms.windowing.SlidingWindows;
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
import org.apache.beam.sdk.transforms.windowing.Window;
import org.apache.beam.sdk.transforms.windowing.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking about *. I haven't seen that elsewhere in Beam. Is it desirable, did allowing that change?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not desirable. This is because I switched IntelliJ versions and it restored to defaults :-(

* demonstrating that the watermark did not cause the output. No runner appears to support
* {@link TestStream} processing time correctly for this, so we do it with actually processing
* time delays, which must be kept small so the test suite does not take forever. There are also
* bugs in runners around {@code Window.configure()} behaving differently than {@code
Copy link
Contributor

Choose a reason for hiding this comment

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

should there be a JIRA for those bugs and referenced here?

Copy link
Member Author

Choose a reason for hiding this comment

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

When I returned to this version of the test after writing the other version, I could not reproduce either issue. Using Window.configure() works, as does the processing time TestStream.

@@ -186,6 +176,112 @@ public void testCombiningAccumulatingProcessingTime() throws Exception {
p.run();
}

/**
* Tests that data from a processing time trigger flows through subsequent GroupByKey
* transforms. To test this with TestStream, we check that it arrives in an early pane,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see where you check it is in the early pane in the test. If it's there maybe a comment would help.

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact I had pushed this with it commented out. The PAssert itself only inspects early panes now.

@kennknowles kennknowles force-pushed the aftersyncproctest branch 2 times, most recently from f3f2a7a to 051d63d Compare February 14, 2022 16:58
@kennknowles
Copy link
Member Author

Unfortunately Jenkins has been down/slow for nearly a week. Ideally I'll run some relevant suites locally and publish gradle scan in the meantime.

@kennknowles
Copy link
Member Author

Flink 1.13 success: https://gradle.com/s/53yqdmo6eo7tu

(had to add UsesUnboundedPCollections category to exclude from batch, which I will push up shortly once I run it through a few more runners)

@kennknowles
Copy link
Member Author

Spark: https://gradle.com/s/qxujjhumbq4he

@kennknowles
Copy link
Member Author

Jenkins woke up long enough to go green.

@kennknowles kennknowles merged commit 150e311 into apache:master Feb 15, 2022
@kennknowles kennknowles deleted the aftersyncproctest branch February 15, 2022 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants