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-8739] Consistently use with Pipeline(...) syntax #10149
Conversation
R: @ibzib lint and tests are now all happy. |
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.
Before I actually go through all of this, a few general comments:
- I see you did a lot of these conversions automatically. I'd be curious what the scripts looked like.
- Ideally we would incorporate this into the linting process, but there's probably enough edge cases to make this infeasible.
- I noticed (as you pointed out on the Jira) that a few tests in here originally didn't call
pipeline.run()
at all (whether throughwith
or directly). My biggest concern with this PR is that it might go the other direction and somewhere remove an existing call topipeline.run()
. (All other errors I could think of would have resulted in test failures, so you would have caught them already.) - If one of the goals here is to encourage everyone to use this syntax, it'd be important to cover the code snippets on the website as well.
Yes, I'll attach the script. Nothing fancy.
Yeah. I'm hoping that mostly people will follow conventions of the surrounding code.
If something is converted to the with syntax, run() will always be called.
Yes. That code is harder to auto (or manually) convert given the amount of mocking and ordering in which things are included/excluded. Taking a pass at the examples and snippets is certainly something that should be done and I'll keep this ticket open until then. |
Just a bunch of regular expression munging...
|
9007580
to
5e91757
Compare
Post-holiday ping. Rebased on latest master. |
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.
Please fix lint errors and precommit (causes commented inline).
sdks/python/apache_beam/runners/dataflow/template_runner_test.py
Outdated
Show resolved
Hide resolved
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
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.