[BEAM-5462] get rid of <pipeline>.options deprecation warnings in tests#6930
[BEAM-5462] get rid of <pipeline>.options deprecation warnings in tests#6930chamikaramj merged 1 commit intoapache:masterfrom
Conversation
|
@udim Looks like it's not easy to fix this issue without public API signature changes and this is a proposal for it. Any idea / feedback is welcomed. |
|
@robertwb Any comment? |
|
run python postcommit |
| p.options.view_as(StandardOptions).streaming = True | ||
| options = PipelineOptions([]) | ||
| p = TestPipeline(options=options) | ||
| options.view_as(StandardOptions).streaming = True |
There was a problem hiding this comment.
Technically this works, but setting streaming should happen before passing options to TestPipeline, since TestPipeline might make a copy of options, already evaluated streaming in the constructor, etc.
|
I'm not sure we want to bind pipelines to a runner, e.g. one could imagine using the same runner to multiple pipelines possibly with different options. Instead, the options should be passed into run_pipeline. |
|
Then it would be better to wait until 3.0 release and add an additional parameter to |
|
If we remove the annotation now then it will be all the harder to remove it later.
|
|
new implementation #7132 |
|
Can you update the existing PR instead of opening a new one so that review can be continued at the same location ? If above is not possible for some reason please close this PR instead of the new one. |
|
@chamikaramj I'll close the new one and update this. |
adding a new parameter `options` to `runner.run_pipeline` method
|
run python postcommit |
|
Run Python Dataflow ValidatesRunner |
|
Run Python Dataflow ValidatesRunner |
|
Run Python Flink ValidatesRunner |
|
Thanks Heejong. Looks like Robert's above comment has been addressed as well. I'll go ahead and merge. |
Add an additional parameter
optionstoPipelineRunner.run_pipeline(self, pipeline)and change the usage ofpipeline.options()andpipeline._optionsto the parameteroptions.Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.It will help us expedite review of your Pull Request if you tag someone (e.g.
@username) to look at it.Post-Commit Tests Status (on master branch)