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

[BEAM-2085] Fixups for Python resource hints. #14605

Merged
merged 2 commits into from
Apr 22, 2021

Conversation

tvalentyn
Copy link
Contributor

  1. Allow resource_hints in Python pipeline option for consistency with experiments and dataflow_service_options.
  2. Raise ValueError instead of Keyerror for proper errors message when hint parsing fails.

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.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

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.

@tvalentyn
Copy link
Contributor Author

R: @robertwb

@@ -134,6 +134,8 @@ def _parse_storage_size_str(value):
raise ValueError()

suffix = match.group(1)
if suffix not in units:
raise ValueError()
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put a more informative message here (e.g. ValueError("Unknown unit: %s" % suffix). Similarly above.

Also, do we want suffixes to be case sensitive. E.g. should we be rejecting "4gb"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is one interpretation where lowercase b means bits.. so wanted to avoid this confusion just in case even though unlikely
https://en.wikipedia.org/wiki/JEDEC_memory_standards#Unit_prefixes_for_semiconductor_storage_capacity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. I suppose we can always loosen it up later more easily than tighten it up.

Even though errors are caught and re-raised, I prefer messages here, but will leave this up to you.

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, I see, sure, that wouldn't hurt and is more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #14605 (f725cc2) into master (facd2c0) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #14605   +/-   ##
=======================================
  Coverage   83.66%   83.67%           
=======================================
  Files         446      446           
  Lines       59239    59253   +14     
=======================================
+ Hits        49565    49582   +17     
+ Misses       9674     9671    -3     
Impacted Files Coverage Δ
...sdks/python/apache_beam/utils/interactive_utils.py 92.68% <0.00%> (-2.44%) ⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py 89.22% <0.00%> (-0.48%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.74% <0.00%> (-0.13%) ⬇️
...dks/python/apache_beam/options/pipeline_options.py 94.69% <0.00%> (+0.01%) ⬆️
.../apache_beam/options/pipeline_options_validator.py 98.78% <0.00%> (+0.08%) ⬆️
...cs/sdks/python/apache_beam/transforms/resources.py 93.69% <0.00%> (+0.11%) ⬆️
...apache_beam/runners/dataflow/internal/apiclient.py 74.74% <0.00%> (+0.84%) ⬆️
...hon/apache_beam/runners/direct/test_stream_impl.py 94.11% <0.00%> (+2.20%) ⬆️

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 46a0b39...f725cc2. Read the comment docs.

@tvalentyn
Copy link
Contributor Author

precommit failure unrealted:

11:17:03 apache_beam.io.gcp.tests.pubsub_matcher: ERROR: Timeout after 400 sec. Received 0 messages from projects/apache-beam-testing/subscriptions/wc_subscription_output3afcfa29-f037-486c-ad2f-ab0c6d841cd3.
11:17:03 --------------------- >> end captured logging << ---------------------
11:17:03 Worker logs: https://console.cloud.google.com/dataflow/jobs/us-central1/2021-04-21_11_02_57-16440804195861241526?project=apache-beam-testing
11:17:03 
11:17:03 ----------------------------------------------------------------------
11:17:03 XML: nosetests-preCommitIT-df-py37.xml
11:17:03 ----------------------------------------------------------------------
11:17:03 XML: /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit@2/src/sdks/python/nosetests.xml
11:17:03 ----------------------------------------------------------------------
11:17:03 Ran 1 test in 872.802s
11:17:03 
11:17:03 FAILED (failures=1)
11:17:03 
11:17:03 > Task :sdks:python:test-suites:dataflow:py37:preCommitIT_streaming_V2 FAILED
11:17:03 

Copy link
Contributor

@robertwb robertwb left a comment

Choose a reason for hiding this comment

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

LGTM

@tvalentyn tvalentyn merged commit 2e9ee8c into apache:master Apr 22, 2021
@tvalentyn tvalentyn deleted the rh_python_fixup branch April 22, 2021 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants