You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Miguel Hernández Sandoval <ro...@wizeline.com> on 2021/05/17 14:35:23 UTC

pb2 file generation

Hi team,
I am working on BEAM-11984[1]. I want to add some labels to
metrics_pb2_urns.py. However, I don't know the process to generate/update
those files. I was hoping you could give me some guidance on this.

Thank you all!

-Mike


[1] https://issues.apache.org/jira/browse/BEAM-11984

-- 
*This email and its contents (including any attachments) are being sent to
you on the condition of confidentiality and may be protected by legal
privilege. Access to this email by anyone other than the intended recipient
is unauthorized. If you are not the intended recipient, please immediately
notify the sender by replying to this message and delete the material
immediately from your system. Any further use, dissemination, distribution
or reproduction of this email is strictly prohibited. Further, no
representation is made with respect to any content contained in this email.*

Re: pb2 file generation

Posted by Miguel Hernández Sandoval <ro...@wizeline.com>.
Thanks for your help Tyson/Alex, this worked just as expected. Thanks a lot!

On Mon, May 17, 2021 at 6:50 PM Alex Amato <aj...@google.com> wrote:

> Hmm, I don't recall if I needed to include the generated files in my PRs
> or not, when i modified these in the past
> You should be able to run this from the python virtualenv/sdk dir: (
> https://cwiki.apache.org/confluence/display/BEAM/Python+Tips), to
> generate the pb2 files from the protos. After changing the relevant .proto
> files. like metrics.proto
> <https://github.com/apache/beam/blob/243128a8fc52798e1b58b0cf1a271d95ee7aa241/model/pipeline/src/main/proto/metrics.proto#L311>
> .
> python3 setup.py sdist
>
>
> Example PR changing proto files
>
> https://github.com/apache/beam/commit/0432f138f2bfb8d4d9543c4569581bdd3f8782db
>
> We generally don't modify and check in the generated _pb2.py files. Just
> let this command above generate the _pb2.py files, which occurs as part of
> building the protos
>
>
>
>
>
> On Mon, May 17, 2021 at 12:29 PM Tyson Hamilton <ty...@google.com>
> wrote:
>
>> +Alex Amato <aj...@google.com> may be able to help with this.
>>
>> On Mon, May 17, 2021 at 7:35 AM Miguel Hernández Sandoval <
>> rogelio.hernandez@wizeline.com> wrote:
>>
>>> Hi team,
>>> I am working on BEAM-11984[1]. I want to add some labels to
>>> metrics_pb2_urns.py. However, I don't know the process to generate/update
>>> those files. I was hoping you could give me some guidance on this.
>>>
>>> Thank you all!
>>>
>>> -Mike
>>>
>>>
>>> [1] https://issues.apache.org/jira/browse/BEAM-11984
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *This email and its contents (including any attachments) are being sent
>>> toyou on the condition of confidentiality and may be protected by
>>> legalprivilege. Access to this email by anyone other than the intended
>>> recipientis unauthorized. If you are not the intended recipient, please
>>> immediatelynotify the sender by replying to this message and delete the
>>> materialimmediately from your system. Any further use, dissemination,
>>> distributionor reproduction of this email is strictly prohibited. Further,
>>> norepresentation is made with respect to any content contained in this
>>> email.*
>>
>>

-- 

Miguel Hernández Sandoval | WIZELINE

Software Engineer

rogelio.hernandez@wizeline.com

Amado Nervo 2200, Esfera P6, Col. Jardines del Sol, 45050 Zapopan, Jal.

-- 
*This email and its contents (including any attachments) are being sent to
you on the condition of confidentiality and may be protected by legal
privilege. Access to this email by anyone other than the intended recipient
is unauthorized. If you are not the intended recipient, please immediately
notify the sender by replying to this message and delete the material
immediately from your system. Any further use, dissemination, distribution
or reproduction of this email is strictly prohibited. Further, no
representation is made with respect to any content contained in this email.*

Re: pb2 file generation

Posted by Alex Amato <aj...@google.com>.
Hmm, I don't recall if I needed to include the generated files in my PRs or
not, when i modified these in the past
You should be able to run this from the python virtualenv/sdk dir: (
https://cwiki.apache.org/confluence/display/BEAM/Python+Tips), to generate
the pb2 files from the protos. After changing the relevant .proto files.
like metrics.proto
<https://github.com/apache/beam/blob/243128a8fc52798e1b58b0cf1a271d95ee7aa241/model/pipeline/src/main/proto/metrics.proto#L311>
.
python3 setup.py sdist


Example PR changing proto files
https://github.com/apache/beam/commit/0432f138f2bfb8d4d9543c4569581bdd3f8782db

We generally don't modify and check in the generated _pb2.py files. Just
let this command above generate the _pb2.py files, which occurs as part of
building the protos





On Mon, May 17, 2021 at 12:29 PM Tyson Hamilton <ty...@google.com> wrote:

> +Alex Amato <aj...@google.com> may be able to help with this.
>
> On Mon, May 17, 2021 at 7:35 AM Miguel Hernández Sandoval <
> rogelio.hernandez@wizeline.com> wrote:
>
>> Hi team,
>> I am working on BEAM-11984[1]. I want to add some labels to
>> metrics_pb2_urns.py. However, I don't know the process to generate/update
>> those files. I was hoping you could give me some guidance on this.
>>
>> Thank you all!
>>
>> -Mike
>>
>>
>> [1] https://issues.apache.org/jira/browse/BEAM-11984
>>
>>
>>
>>
>>
>>
>>
>>
>> *This email and its contents (including any attachments) are being sent
>> toyou on the condition of confidentiality and may be protected by
>> legalprivilege. Access to this email by anyone other than the intended
>> recipientis unauthorized. If you are not the intended recipient, please
>> immediatelynotify the sender by replying to this message and delete the
>> materialimmediately from your system. Any further use, dissemination,
>> distributionor reproduction of this email is strictly prohibited. Further,
>> norepresentation is made with respect to any content contained in this
>> email.*
>
>

Re: pb2 file generation

Posted by Tyson Hamilton <ty...@google.com>.
+Alex Amato <aj...@google.com> may be able to help with this.

On Mon, May 17, 2021 at 7:35 AM Miguel Hernández Sandoval <
rogelio.hernandez@wizeline.com> wrote:

> Hi team,
> I am working on BEAM-11984[1]. I want to add some labels to
> metrics_pb2_urns.py. However, I don't know the process to generate/update
> those files. I was hoping you could give me some guidance on this.
>
> Thank you all!
>
> -Mike
>
>
> [1] https://issues.apache.org/jira/browse/BEAM-11984
>
>
>
>
>
>
>
>
> *This email and its contents (including any attachments) are being sent
> toyou on the condition of confidentiality and may be protected by
> legalprivilege. Access to this email by anyone other than the intended
> recipientis unauthorized. If you are not the intended recipient, please
> immediatelynotify the sender by replying to this message and delete the
> materialimmediately from your system. Any further use, dissemination,
> distributionor reproduction of this email is strictly prohibited. Further,
> norepresentation is made with respect to any content contained in this
> email.*