You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Kristian Grimsby (Jira)" <ji...@apache.org> on 2022/09/26 07:41:00 UTC
[jira] [Created] (FLINK-29411) DESCRIPTOR in flink_fn_execution_pb2.py always None?
Kristian Grimsby created FLINK-29411:
----------------------------------------
Summary: 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
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)