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

Fix NonType error when importing google.api_core fails #17774

Merged
merged 1 commit into from
May 27, 2022

Conversation

ihji
Copy link
Contributor

@ihji ihji commented May 27, 2022

skipIf doesn't work for parameterized arguments since it's executed first.


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.

@ihji
Copy link
Contributor Author

ihji commented May 27, 2022

R: @ahmedabu98
CC: @pabloem

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #17774 (541dfb3) into master (5bb3127) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #17774      +/-   ##
==========================================
- Coverage   74.01%   74.00%   -0.01%     
==========================================
  Files         695      695              
  Lines       91798    91806       +8     
==========================================
+ Hits        67941    67942       +1     
- Misses      22611    22618       +7     
  Partials     1246     1246              
Flag Coverage Δ
python 83.74% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) ⬇️
.../python/apache_beam/transforms/periodicsequence.py 96.72% <0.00%> (-1.64%) ⬇️
...che_beam/runners/interactive/interactive_runner.py 89.20% <0.00%> (-1.44%) ⬇️
...eam/runners/portability/fn_api_runner/execution.py 92.44% <0.00%> (-0.65%) ⬇️
sdks/python/apache_beam/transforms/combiners.py 93.05% <0.00%> (-0.39%) ⬇️
...ks/python/apache_beam/runners/worker/operations.py 74.02% <0.00%> (-0.07%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.54% <0.00%> (-0.01%) ⬇️
sdks/python/apache_beam/io/textio.py 96.89% <0.00%> (ø)
...s/python/apache_beam/io/gcp/pubsublite/external.py 0.00% <0.00%> (ø)
.../python/apache_beam/io/gcp/pubsublite/proto_api.py 0.00% <0.00%> (ø)
... and 6 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 5bb3127...541dfb3. Read the comment docs.

error_reason='internalError'),
param(
exception_type=exceptions.InternalServerError,
exception_type=exceptions.InternalServerError if exceptions else None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these tests still run if empty params are passed in? Would it be more optimal to skip them entirely? Something like this in the beginning of each affected test:

if exceptions is None:
  self.skipTest("Import fail: google.api_core")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's already there:

HttpError is None or exceptions is None,

this pr fixes the error thrown even when the test is marked as skipped.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see. This LGTM then.

@ihji ihji merged commit 668e050 into apache:master May 27, 2022
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.

None yet

2 participants