You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "lostluck (via GitHub)" <gi...@apache.org> on 2024/04/18 21:33:45 UTC

[PR] [#30083][prism] Stabilize additional teststream cases. [beam]

lostluck opened a new pull request, #31046:
URL: https://github.com/apache/beam/pull/31046

   While working on adding Processing Time handling, it came to light that there were some inconsistent cases WRT handling TestStream based pipelines, in particular when there were no impulses included.
   
   This fix uses the existing watermark hold system to restrain execution until the test stream is ready, and reflect holds based on test stream watermark events properly before their execution.
   
   This discovered flaky fail behavior due to how timers and data outputs were handled in bundle processing, also fixed in this PR. 
   
   ------------------------
   
   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](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](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](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#30083][prism] Stabilize additional teststream cases. [beam]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #31046:
URL: https://github.com/apache/beam/pull/31046#issuecomment-2070304647

   ## [Codecov](https://app.codecov.io/gh/apache/beam/pull/31046?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `94.82759%` with `3 lines` in your changes are missing coverage. Please review.
   > Project coverage is 54.39%. Comparing base [(`a26c505`)](https://app.codecov.io/gh/apache/beam/commit/a26c5055cccfde5780913586439c6f0df949e256?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d17422e`)](https://app.codecov.io/gh/apache/beam/pull/31046?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 37 commits behind head on master.
   
   | [Files](https://app.codecov.io/gh/apache/beam/pull/31046?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...g/beam/runners/prism/internal/engine/teststream.go](https://app.codecov.io/gh/apache/beam/pull/31046?src=pr&el=tree&filepath=sdks%2Fgo%2Fpkg%2Fbeam%2Frunners%2Fprism%2Finternal%2Fengine%2Fteststream.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ByaXNtL2ludGVybmFsL2VuZ2luZS90ZXN0c3RyZWFtLmdv) | 91.42% | [2 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/beam/pull/31046?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #31046      +/-   ##
   ==========================================
   + Coverage   54.33%   54.39%   +0.06%     
   ==========================================
     Files         307      307              
     Lines       38123    38174      +51     
   ==========================================
   + Hits        20713    20765      +52     
   + Misses      15781    15776       -5     
   - Partials     1629     1633       +4     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/beam/pull/31046/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [go](https://app.codecov.io/gh/apache/beam/pull/31046/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `54.39% <94.82%> (+0.06%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/beam/pull/31046?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#30083][prism] Stabilize additional teststream cases. [beam]

Posted by "riteshghorse (via GitHub)" <gi...@apache.org>.
riteshghorse commented on code in PR #31046:
URL: https://github.com/apache/beam/pull/31046#discussion_r1574767303


##########
sdks/go/test/integration/primitives/teststream_test.go:
##########
@@ -71,3 +71,23 @@ func TestTestStreamTwoUserTypeSequences(t *testing.T) {
 	integration.CheckFilters(t)
 	ptest.BuildAndRun(t, TestStreamTwoUserTypeSequences)
 }
+
+func TestTestStreamSimple(t *testing.T) {
+	integration.CheckFilters(t)
+	ptest.BuildAndRun(t, TestStreamSimple)
+}
+
+func TestTestStreamTestStreamSimple_InfinityDefault(t *testing.T) {

Review Comment:
   ```suggestion
   func TestTestStreamSimple_InfinityDefault(t *testing.T) {
   ```



##########
sdks/go/test/integration/primitives/teststream_test.go:
##########
@@ -71,3 +71,23 @@ func TestTestStreamTwoUserTypeSequences(t *testing.T) {
 	integration.CheckFilters(t)
 	ptest.BuildAndRun(t, TestStreamTwoUserTypeSequences)
 }
+
+func TestTestStreamSimple(t *testing.T) {
+	integration.CheckFilters(t)
+	ptest.BuildAndRun(t, TestStreamSimple)
+}
+
+func TestTestStreamTestStreamSimple_InfinityDefault(t *testing.T) {
+	integration.CheckFilters(t)
+	ptest.BuildAndRun(t, TestStreamSimple_InfinityDefault)
+}
+
+func TestTestStreamToGBK(t *testing.T) {
+	integration.CheckFilters(t)
+	ptest.BuildAndRun(t, TestStreamToGBK)
+}
+
+func TestTestStreamTimersEventTimeTestStream(t *testing.T) {

Review Comment:
   ```suggestion
   func TestTestStreamTimersEventTime(t *testing.T) {
   ```



##########
sdks/go/test/integration/primitives/teststream.go:
##########
@@ -172,3 +175,74 @@ func TestStreamInt16Sequence(s beam.Scope) {
 	passert.Count(s, col, "teststream int15", 3)
 	passert.EqualsList(s, col, ele)
 }
+
+// panicIfNot42 panics if the value is not 42.
+func panicIfNot42(v int) {
+	if v != 42 {
+		panic(fmt.Sprintf("got %v, want 42", v))
+	}
+}
+
+// dropKeyEmitValues panics if the value is not 42.

Review Comment:
   ```suggestion
   // dropKeyEmitValues drops the key and emits the value.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#30083][prism] Stabilize additional teststream cases. [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #31046:
URL: https://github.com/apache/beam/pull/31046#issuecomment-2065408107

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#30083][prism] Stabilize additional teststream cases. [beam]

Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck merged PR #31046:
URL: https://github.com/apache/beam/pull/31046


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#30083][prism] Stabilize additional teststream cases. [beam]

Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck commented on PR #31046:
URL: https://github.com/apache/beam/pull/31046#issuecomment-2070318234

   Nice catches! Thanks. Merging once the recommits pass again.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org