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

Composite triggers and unit tests for Go SDK #21756

Merged
merged 8 commits into from
Jun 13, 2022

Conversation

riteshghorse
Copy link
Contributor

@riteshghorse riteshghorse commented Jun 8, 2022

Closes #21759

Adds composite triggers. Tested on flink runner.


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).
  • Add a link to the appropriate issue in your description, 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.

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

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

@asf-ci
Copy link

asf-ci commented Jun 8, 2022

Can one of the admins verify this patch?

2 similar comments
@asf-ci
Copy link

asf-ci commented Jun 8, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 8, 2022

Can one of the admins verify this patch?

@github-actions github-actions bot added the go label Jun 8, 2022
@riteshghorse riteshghorse changed the title Beam 3304 Composite triggers and unit tests for Go SDK Jun 8, 2022
@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #21756 (dade99a) into master (f131b2d) will increase coverage by 0.04%.
The diff coverage is 22.22%.

@@            Coverage Diff             @@
##           master   #21756      +/-   ##
==========================================
+ Coverage   74.00%   74.05%   +0.04%     
==========================================
  Files         698      697       -1     
  Lines       92224    92119     -105     
==========================================
- Hits        68253    68219      -34     
+ Misses      22720    22645      -75     
- Partials     1251     1255       +4     
Flag Coverage Δ
go 50.87% <22.22%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdks/go/pkg/beam/core/runtime/graphx/translate.go 42.40% <0.00%> (-0.74%) ⬇️
...s/go/pkg/beam/core/graph/window/trigger/trigger.go 48.76% <29.09%> (-10.34%) ⬇️
sdks/python/apache_beam/utils/python_callable.py 55.55% <0.00%> (-40.28%) ⬇️
sdks/python/apache_beam/internal/gcp/auth.py 73.33% <0.00%> (-5.34%) ⬇️
sdks/python/apache_beam/io/source_test_utils.py 88.01% <0.00%> (-1.39%) ⬇️
...ache_beam/runners/portability/local_job_service.py 81.65% <0.00%> (-0.62%) ⬇️
...ks/python/apache_beam/runners/worker/data_plane.py 87.57% <0.00%> (-0.57%) ⬇️
sdks/python/apache_beam/io/fileio.py 95.98% <0.00%> (-0.35%) ⬇️
sdks/python/apache_beam/ml/inference/base.py 93.54% <0.00%> (-0.16%) ⬇️
sdks/python/apache_beam/transforms/ptransform.py 93.54% <0.00%> (-0.04%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f131b2d...dade99a. Read the comment docs.

@riteshghorse riteshghorse marked this pull request as ready for review June 8, 2022 21:37
@riteshghorse
Copy link
Contributor Author

Run GoPortable PostCommit

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

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

R: @lostluck 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).

@lostluck
Copy link
Contributor

Run Go Flink ValidatesRunner

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.

LGTM, but the tests were enabled for flink but the validates runner for flink wasn't run.

Hmmm we could probably put the code phrase for each runner right near their filter lists to help folks learn what the code phrases are.

@lostluck
Copy link
Contributor

One test failed. I thought flink didn't support ProcessingTime triggers?

--- FAIL: TestTriggerAfterSynchronizedProcessingTime
2022/06/10 01:50:02  (): java.lang.RuntimeException: Error received from SDK harness for instruction 9: process bundle failed for instruction 9 using plan 47-24 : while executing Process for Plan[47-24]:
2: ParDo[passert.errFn] Out:[]
3: PCollection[n12] Out:[2]
4: ParDo[beam.dropKeyFn] Out:[3]
5: PCollection[n11] Out:[4]
6: Combine[passert.elmCountCombineFn] Keyed:false Out:5
1: DataSource[S[fn/read/n10:0@localhost:41663], local_output] Coder:W;fn/wire/n10:0<CoGBK;c7<int[varintz;c3];c4,double;c0>>!GWC Out:6
	caused by:
DoFn[UID:2, PID:Global/passert.Count(total collections)/passert.errFn, Name: github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert.errFn] failed:
passert.Count(total collections) = 4, want 2

@riteshghorse
Copy link
Contributor Author

Flink doesn't support advancing processing time. That's the reason after processing time trigger is skipped.
AfterSynchronizedProcessingTime trigger however, may give different output in different runs depending on whether the processing time is synchronized with arrival time or not.

@lostluck
Copy link
Contributor

Run Go Flink ValidatesRunner

3 similar comments
@lostluck
Copy link
Contributor

Run Go Flink ValidatesRunner

@lostluck
Copy link
Contributor

Run Go Flink ValidatesRunner

@riteshghorse
Copy link
Contributor Author

Run Go Flink ValidatesRunner

@lostluck
Copy link
Contributor

I did a bit of manual handling to trigger flink, and verified the new tests exist. Merging!

https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink_PR/145/ which passed.

@lostluck lostluck merged commit 806ec34 into apache:master Jun 13, 2022
bullet03 pushed a commit to akvelon/beam that referenced this pull request Jun 20, 2022
@riteshghorse riteshghorse deleted the beam-3304 branch August 22, 2022 14:06
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.

[Feature Request]: Composite triggers for Go SDK
3 participants