Add Async Dofn and Test to BEAM
Adds Async Dofns and their tests to BEAM.
Meant to be used in cases where processing is long and we don't want to block the GetWork/CommitWork streams waiting for the processing to finish synchronously. Instead we buffer the item into state, add it to a queue, and commit the result when the item is finished using state and timers.
Takes a standard Dofn as input and does the dofns work asynchronously.
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, commentfixes #<ISSUE NUMBER>instead. - [ ] Update
CHANGES.mdwith 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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers
Codecov Report
Attention: Patch coverage is 96.64804% with 6 lines in your changes missing coverage. Please review.
Project coverage is 54.55%. Comparing base (
de76cfa) to head (36174c9). Report is 22 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| sdks/python/apache_beam/transforms/async_dofn.py | 96.64% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #35245 +/- ##
============================================
+ Coverage 54.50% 54.55% +0.05%
+ Complexity 1479 1470 -9
============================================
Files 1017 1023 +6
Lines 160983 161293 +310
Branches 1079 1078 -1
============================================
+ Hits 87737 87988 +251
- Misses 71140 71199 +59
Partials 2106 2106
| Flag | Coverage Δ | |
|---|---|---|
| python | 80.93% <96.64%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Assigning reviewers:
R: @damccorm for label python.
Note: If you would like to opt out of this review, comment assign to next reviewer.
Available commands:
stop reviewer notifications- opt out of the automated review toolingremind me after tests pass- tag the comment author after tests passwaiting 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).