[
https://issues.apache.org/jira/browse/FLINK-29411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Grimsby closed FLINK-29411.
------------------------------------
Resolution: Invalid
> DESCRIPTOR in flink_fn_execution_pb2.py always None?
> ----------------------------------------------------
>
> Key: FLINK-29411
> URL: https://issues.apache.org/jira/browse/FLINK-29411
> Project: Flink
> Issue Type: Bug
> Components: API / Python
> Affects Versions: 1.16.0
> Environment: Python 3.9
> Flink built from release-1.16 branch
> Reporter: Kristian Grimsby
> Priority: Major
>
> Browsing through the code trying to debug an error I discovered that PR 20685
> might have introduced a bug.
> {code:java}
> // pyflink/fn_execution/flink_fn_execution_pb2.py
> ...
> DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'...')
> ... {code}
> According to dev-requirements.txt is protobuf installed with version <3.18.
> DESCRIPTOR will always be None, since AddSerializedFile in protbuf <3.18 will
> never return anything:
> {code:java}
> def AddSerializedFile(self, serialized_file_desc_proto):
> """Adds the FileDescriptorProto and its types to this pool.
> Args:
> serialized_file_desc_proto (bytes): A bytes string, serialization of the
> :class:`FileDescriptorProto` to add.
> """
> # pylint: disable=g-import-not-at-top
> from google.protobuf import descriptor_pb2
> file_desc_proto = descriptor_pb2.FileDescriptorProto.FromString(
> serialized_file_desc_proto)
> self.Add(file_desc_proto) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)