You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Igor Mossinato <ig...@gmail.com> on 2021/07/04 19:18:23 UTC

Documentation error

Hello everybody,

Thanks for the amazing work! I'm loving it!

But the python code on the item 2.1.1. Setting PipelineOptions from
command-line arguments is wrong.

According to Google docs
<https://cloud.google.com/dataflow/docs/guides/setting-pipeline-options#python_1>
it should be:


from apache_beam.options.pipeline_options import PipelineOptions

options = PipelineOptions(flags=argv)


Regards!

Re: Documentation error

Posted by Ahmet Altay <al...@google.com>.
You are right. Thank you.

On Wed, Jul 7, 2021 at 11:09 AM Luke Cwik <lc...@google.com> wrote:

> Thanks, there is still an issue where .md is referring to the wrong code
> snippet. See https://github.com/apache/beam/pull/15133.
>
> On Wed, Jul 7, 2021 at 11:02 AM Ahmet Altay <al...@google.com> wrote:
>
>> I believe both Beam and Dataflow doc are correct in this case. Because
>> the pydocs for the `flags` says that it default to sys.argv. (
>> https://github.com/aaltay/beam/blob/eb8ceeb297a4ccaf0fd8a411a9486f2af962f052/sdks/python/apache_beam/options/pipeline_options.py#L184
>> )
>>
>> On Wed, Jul 7, 2021 at 10:53 AM Luke Cwik <lc...@google.com> wrote:
>>
>>> Filed BEAM-12584 and posted fix
>>> https://github.com/apache/beam/pull/15133.
>>>
>>> Igor, would you like to review the code. If it looks good to you then
>>> comment LGTM on the PR.
>>>
>>> On Wed, Jul 7, 2021 at 9:30 AM Igor Mossinato <ig...@gmail.com>
>>> wrote:
>>>
>>>> Hello everybody,
>>>>
>>>> Thanks for the amazing work! I'm loving it!
>>>>
>>>> But the python code on the item 2.1.1. Setting PipelineOptions from
>>>> command-line arguments is wrong.
>>>>
>>>> According to Google docs
>>>> <https://cloud.google.com/dataflow/docs/guides/setting-pipeline-options#python_1>
>>>> it should be:
>>>>
>>>>
>>>> from apache_beam.options.pipeline_options import PipelineOptions
>>>>
>>>> options = PipelineOptions(flags=argv)
>>>>
>>>>
>>>> Regards!
>>>>
>>>

Re: Documentation error

Posted by Luke Cwik <lc...@google.com>.
Thanks, there is still an issue where .md is referring to the wrong code
snippet. See https://github.com/apache/beam/pull/15133.

On Wed, Jul 7, 2021 at 11:02 AM Ahmet Altay <al...@google.com> wrote:

> I believe both Beam and Dataflow doc are correct in this case. Because the
> pydocs for the `flags` says that it default to sys.argv. (
> https://github.com/aaltay/beam/blob/eb8ceeb297a4ccaf0fd8a411a9486f2af962f052/sdks/python/apache_beam/options/pipeline_options.py#L184
> )
>
> On Wed, Jul 7, 2021 at 10:53 AM Luke Cwik <lc...@google.com> wrote:
>
>> Filed BEAM-12584 and posted fix https://github.com/apache/beam/pull/15133
>> .
>>
>> Igor, would you like to review the code. If it looks good to you then
>> comment LGTM on the PR.
>>
>> On Wed, Jul 7, 2021 at 9:30 AM Igor Mossinato <ig...@gmail.com>
>> wrote:
>>
>>> Hello everybody,
>>>
>>> Thanks for the amazing work! I'm loving it!
>>>
>>> But the python code on the item 2.1.1. Setting PipelineOptions from
>>> command-line arguments is wrong.
>>>
>>> According to Google docs
>>> <https://cloud.google.com/dataflow/docs/guides/setting-pipeline-options#python_1>
>>> it should be:
>>>
>>>
>>> from apache_beam.options.pipeline_options import PipelineOptions
>>>
>>> options = PipelineOptions(flags=argv)
>>>
>>>
>>> Regards!
>>>
>>

Re: Documentation error

Posted by Ahmet Altay <al...@google.com>.
I believe both Beam and Dataflow doc are correct in this case. Because the
pydocs for the `flags` says that it default to sys.argv. (
https://github.com/aaltay/beam/blob/eb8ceeb297a4ccaf0fd8a411a9486f2af962f052/sdks/python/apache_beam/options/pipeline_options.py#L184
)

On Wed, Jul 7, 2021 at 10:53 AM Luke Cwik <lc...@google.com> wrote:

> Filed BEAM-12584 and posted fix https://github.com/apache/beam/pull/15133.
>
> Igor, would you like to review the code. If it looks good to you then
> comment LGTM on the PR.
>
> On Wed, Jul 7, 2021 at 9:30 AM Igor Mossinato <ig...@gmail.com>
> wrote:
>
>> Hello everybody,
>>
>> Thanks for the amazing work! I'm loving it!
>>
>> But the python code on the item 2.1.1. Setting PipelineOptions from
>> command-line arguments is wrong.
>>
>> According to Google docs
>> <https://cloud.google.com/dataflow/docs/guides/setting-pipeline-options#python_1>
>> it should be:
>>
>>
>> from apache_beam.options.pipeline_options import PipelineOptions
>>
>> options = PipelineOptions(flags=argv)
>>
>>
>> Regards!
>>
>

Re: Documentation error

Posted by Luke Cwik <lc...@google.com>.
Filed BEAM-12584 and posted fix https://github.com/apache/beam/pull/15133.

Igor, would you like to review the code. If it looks good to you then
comment LGTM on the PR.

On Wed, Jul 7, 2021 at 9:30 AM Igor Mossinato <ig...@gmail.com>
wrote:

> Hello everybody,
>
> Thanks for the amazing work! I'm loving it!
>
> But the python code on the item 2.1.1. Setting PipelineOptions from
> command-line arguments is wrong.
>
> According to Google docs
> <https://cloud.google.com/dataflow/docs/guides/setting-pipeline-options#python_1>
> it should be:
>
>
> from apache_beam.options.pipeline_options import PipelineOptions
>
> options = PipelineOptions(flags=argv)
>
>
> Regards!
>