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 flag to control automatic exception sampling in Python (disabled) #28418

Merged
merged 4 commits into from
Sep 13, 2023

Conversation

rohdesamuel
Copy link
Contributor

This enables exception sampling when either the "enable_data_sampling" or "enable_always_on_exception_sampling" experiment is present. This disables automatic exception sampling when "disable_always_on_exception_sampling" is given.


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.

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
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@rohdesamuel
Copy link
Contributor Author

R: @udim

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #28418 (cd8bfec) into master (1225dee) will decrease coverage by 0.02%.
Report is 26 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #28418      +/-   ##
==========================================
- Coverage   72.33%   72.31%   -0.02%     
==========================================
  Files         682      683       +1     
  Lines      100541   100633      +92     
==========================================
+ Hits        72723    72771      +48     
- Misses      26243    26287      +44     
  Partials     1575     1575              
Flag Coverage Δ
python 82.82% <100.00%> (-0.05%) ⬇️

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

Files Changed Coverage Δ
.../python/apache_beam/runners/worker/data_sampler.py 98.19% <100.00%> (+0.16%) ⬆️
...ks/python/apache_beam/runners/worker/operations.py 75.21% <100.00%> (+0.03%) ⬆️
...thon/apache_beam/runners/worker/sdk_worker_main.py 78.03% <100.00%> (+0.32%) ⬆️

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

# When true, enables the sampling of all PCollections and exceptions.
enable_data_sampling = DataSampler._ENABLE_DATA_SAMPLING in experiments

if enable_data_sampling or always_on_exception_sampling:
Copy link
Member

Choose a reason for hiding this comment

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

If both of these flags are true, only exception sampling is enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah gotcha, looks like Java has the logic but not here. Added it here and added a test.

Copy link
Member

Choose a reason for hiding this comment

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

@rohdesamuel
Copy link
Contributor Author

Run Python_Runners PreCommit

@rohdesamuel
Copy link
Contributor Author

Run Portable_Python PreCommit

@udim udim merged commit 1b42ded into apache:master Sep 13, 2023
77 checks passed
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