-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Python]Don't stage beam SDK in Stager #27436
Conversation
89abd9b
to
44b3984
Compare
Codecov Report
@@ Coverage Diff @@
## master #27436 +/- ##
==========================================
- Coverage 70.88% 70.87% -0.01%
==========================================
Files 861 861
Lines 105040 104999 -41
==========================================
- Hits 74454 74415 -39
+ Misses 29027 29025 -2
Partials 1559 1559
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Run Python 3.10 PostCommit |
Run Python 3.11 PostCommit |
Assigning reviewers. If you would like to opt out of this review, comment R: @riteshghorse for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor nits. Thanks!
'The --sdk_location option was used with an unsupported ' | ||
'type of location: %s' % sdk_location) | ||
|
||
elif sdk_location == 'default' or sdk_location == 'container': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we still keep the comment here
# Use the SDK that's built into the container, rather than re-staging it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sg. I will re-add the comment along with some more context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif sdk_location == 'default':
# Use default location for a runner.
pass
elif sdk_location == 'container':
# Used in the past to indicate that SDK should be used from container image instead of being staged.
# Equivalent to 'default' now, leaving for backwards compatibility reasons.
pass
R: @tvalentyn |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes to go files looks good
Run Python Dataflow ValidatesContainer |
1 similar comment
Run Python Dataflow ValidatesContainer |
Run Python RC Dataflow ValidatesContainer |
'Override the default location from where the Beam SDK is ' | ||
'downloaded. It can be a URL, a GCS path, or a local path to an ' | ||
'Override the default location of the beam SDK. ' | ||
'It can be a URL, a GCS path, or a local path to an ' | ||
'SDK tarball. Workflow submissions will download or copy an SDK ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this flag when running pipelines with an unreleased or manually patched version of Beam SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded
'tarball from here. If set to the string "default", a standard ' | ||
'SDK location is used. If empty, no SDK is copied.')) | ||
'tarball from here. If set to the string "default", ' | ||
'the beam SDK in the default container will be used.')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If set to the string "default", runners will use the SDK provided in the default environment.
'The --sdk_location option was used with an unsupported ' | ||
'type of location: %s' % sdk_location) | ||
|
||
elif sdk_location == 'default' or sdk_location == 'container': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif sdk_location == 'default':
# Use default location for a runner.
pass
elif sdk_location == 'container':
# Used in the past to indicate that SDK should be used from container image instead of being staged.
# Equivalent to 'default' now, leaving for backwards compatibility reasons.
pass
sdks/python/container/boot.go
Outdated
pkgName := "apache-beam" | ||
isSdkInstalled, err := isPackageInstalled(pkgName) | ||
if err != nil { | ||
return fmt.Errorf("failed to check if Apache Beam %s is installed: %v", pkgName, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be a hard error, we can attempt to continue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this entirely.
sdks/python/container/boot.go
Outdated
} | ||
|
||
if !isSdkInstalled { | ||
log.Printf("Apache Beam is not installed on the custom container. Please make sure Apache Beam is installed in the custom container. Look at the docummentation https://beam.apache.org/documentation/runtime/environments/ on custom containers for more details.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wording suggestion: "Apache Beam is not installed in the runtime environment. If you use a custom container image, you must install apache-beam package in the custom image using same version of Beam as in the pipeline submission environment. For more information, see: the https://beam.apache.org/documentation/runtime/environments/ page."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed wording
Co-authored-by: tvalentyn <tvalentyn@users.noreply.github.com>
Run Python_Runners PreCommit |
Thanks, changes look good to me. have you tested them in positive and negative case? Negative case requries building a custom docker image similar to https://cloud.google.com/dataflow/docs/guides/using-custom-containers#use_a_custom_base_image_or_multi-stage_builds but w/o Beam. If you are already OOO i can TAL next week, np. |
This job uses the container |
hmm.. that job has errors like:
we should expect to see |
This is the latest job with the updated boot.go. This is working as expected as we can see the expected errors in the logs. |
Co-authored-by: tvalentyn <tvalentyn@users.noreply.github.com>
Fixes: #26996
Support for DataflowRunner v1 will be deprecated from the version 2.50.0. As part of the effort, we can remove staging the beam SDK that is downloaded from pypi by default.
This PR changes the default value of
sdk_container
tocontainer
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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.CHANGES.md
with noteworthy changes.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.