jina-ai / jina

☁️ Build multimodal AI applications with cloud-native stack
https://docs.jina.ai
Apache License 2.0
20.99k stars 2.22k forks source link

`protoc` 3.13 generated code is not back-compatible #1195

Closed hanxiao closed 3 years ago

hanxiao commented 3 years ago

Describe your problem

protoc 3.13 generated code can not be used with 3.11 backend.

My local dev setup,

protobuf                      3.11.3
proto-backend                 cpp
grpcio                        1.28.1

Throw error

../../__init__.py:9: in <module>
    from jina.proto import jina_pb2, uid
../../../jina/proto/__init__.py:9: in <module>
    from .jina_pb2 import Request
../../../jina/proto/jina_pb2.py:23: in <module>
    create_key=_descriptor._internal_create_key,
E   AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'

What is your guess?

To our devs: to upgrade our local protobuf version?


Environment

Screenshots

JoanFM commented 3 years ago

@bhavsarpratik seems like the reason the hub ci is failing

hanxiao commented 3 years ago

@JoanFM what is your local protoc version, can you do jina -vf, mine dev env is

jina                          0.7.4
jina-proto                    0.0.66
jina-vcs-tag                  (unset)
libzmq                        4.3.2
pyzmq                         1.18.5
protobuf                      3.11.3
proto-backend                 cpp
grpcio                        1.28.1
ruamel.yaml                   0.16.10
python                        3.7.5
platform                      Darwin
platform-release              19.2.0
platform-version              Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
architecture                  x86_64
JoanFM commented 3 years ago

I have:

jina                          0.7.4
jina-proto                    0.0.66
jina-vcs-tag                  (unset)
libzmq                        4.3.2
pyzmq                         1.17.3
protobuf                      3.0.0
proto-backend                 cpp
grpcio                        1.30.0
ruamel.yaml                   0.16.10
python                        3.7.5
platform                      Linux
platform-release              5.4.0-52-generic
platform-version              #57~18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020
architecture                  x86_64
processor                     x86_64
hanxiao commented 3 years ago

man your protobuf is too old

hanxiao commented 3 years ago

maybe we need to dockerized the Python protobuf generation part so that community devs won't face the same problem