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

[#21252] Enforce pubsub message publishing limits in the python SDK #17794

Merged
merged 2 commits into from
Jun 13, 2022

Conversation

scwhittle
Copy link
Contributor

@scwhittle scwhittle commented Jun 1, 2022

This improves visiblity as otherwise messages can become stuck publishing
inside runners such as dataflow that specialize pubsub publishing. This also allows users to handle errors by
catching them.

Fixes issue #21252


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.

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 1, 2022

Can one of the admins verify this patch?

2 similar comments
@asf-ci
Copy link

asf-ci commented Jun 1, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 1, 2022

Can one of the admins verify this patch?

@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #17794 (5ae4d01) into master (ca33943) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master   #17794      +/-   ##
==========================================
- Coverage   74.00%   73.96%   -0.04%     
==========================================
  Files         695      696       +1     
  Lines       91898    92205     +307     
==========================================
+ Hits        68013    68204     +191     
- Misses      22639    22755     +116     
  Partials     1246     1246              
Flag Coverage Δ
python 83.64% <75.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
sdks/python/apache_beam/io/gcp/pubsub.py 90.78% <75.00%> (+0.13%) ⬆️
...ache_beam/runners/dataflow/dataflow_job_service.py 50.00% <0.00%> (-12.17%) ⬇️
...eam/transforms/py_dataflow_distribution_counter.py 91.42% <0.00%> (-4.87%) ⬇️
sdks/python/apache_beam/dataframe/io.py 88.78% <0.00%> (-3.26%) ⬇️
...eam/runners/portability/fn_api_runner/fn_runner.py 87.51% <0.00%> (-2.50%) ⬇️
...nners/portability/fn_api_runner/worker_handlers.py 77.89% <0.00%> (-1.45%) ⬇️
sdks/python/apache_beam/io/source_test_utils.py 88.01% <0.00%> (-1.39%) ⬇️
sdks/python/apache_beam/utils/counters.py 85.39% <0.00%> (-1.36%) ⬇️
sdks/python/apache_beam/internal/dill_pickler.py 85.61% <0.00%> (-0.72%) ⬇️
...thon/apache_beam/ml/inference/sklearn_inference.py 92.50% <0.00%> (-0.19%) ⬇️
... and 24 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 ca33943...5ae4d01. Read the comment docs.

@scwhittle scwhittle force-pushed the python_limits branch 2 times, most recently from 5907d19 to 756a02f Compare June 1, 2022 12:10
@scwhittle
Copy link
Contributor Author

R: @pabloem

@scwhittle scwhittle changed the title [BEAM-12942] Enforce pubsub message publishing limits in the python SDK [#21252] Enforce pubsub message publishing limits in the python SDK Jun 8, 2022
@scwhittle
Copy link
Contributor Author

@pabloem Friendly ping

… SDK

This improves visiblity as otherwise messages can become stuck publishing
inside the dataflow runner. This also allows users to handle errors by
catching them.

Fixes issue apache#21252 for python sdk.
@scwhittle
Copy link
Contributor Author

Thanks Pablo, PTAL. There are a couple failures that appear unrelated though Run Python PreCommit hasn't finished yet

@pabloem
Copy link
Member

pabloem commented Jun 10, 2022

Run Python 3.8 PostCommit

2 similar comments
@pabloem
Copy link
Member

pabloem commented Jun 10, 2022

Run Python 3.8 PostCommit

@scwhittle
Copy link
Contributor Author

Run Python 3.8 PostCommit

@scwhittle
Copy link
Contributor Author

Thanks for the test fix, sorry I wasn't able to get my virtualenv setup so I was having trouble running tests locally before pushing.

@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

Run Python 3.8 PostCommit

1 similar comment
@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

Run Python 3.8 PostCommit

@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

Run Portable_Python PreCommit

1 similar comment
@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

Run Portable_Python PreCommit

@pabloem
Copy link
Member

pabloem commented Jun 13, 2022

thanks Sam! merging. LGTM

@pabloem pabloem merged commit d2fb942 into apache:master Jun 13, 2022
bullet03 pushed a commit to akvelon/beam that referenced this pull request Jun 20, 2022
…ssage publishing limits in the python SDK

* [apache#21252] Enforce pubsub message publishing limits in the python SDK

This improves visiblity as otherwise messages can become stuck publishing
inside the dataflow runner. This also allows users to handle errors by
catching them.

Fixes issue apache#21252 for python sdk.

* fixtest

Co-authored-by: Pablo <[email protected]>
@scwhittle scwhittle deleted the python_limits branch July 25, 2023 23:08
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.

3 participants