-
Bug
-
Resolution: Done
-
Medium
-
Kohn Release
-
None
protobuf is installed as a transitive dependency to grpcio-tools
In recent builds the version is bumped from 3.20.1 to 4.21.1. The new major release is not backward compatible with proto files that are created by the older version we are running in cds (3.10.0)
Dependency tree in command-executor
onap@e47963760f60:/$ python -m pipdeptree grpcio-tools==1.20.0 - grpcio [required: >=1.20.0, installed: 1.20.0] - six [required: >=1.5.2, installed: 1.16.0] - protobuf [required: >=3.5.0.post1, installed: 4.21.1] pipdeptree==2.2.1 - pip [required: >=6.0.0, installed: 22.1.2] prometheus-client==0.11.0 requests==2.26.0 - certifi [required: >=2017.4.17, installed: 2022.5.18.1] - charset-normalizer [required: ~=2.0.0, installed: 2.0.12] - idna [required: >=2.5,<4, installed: 3.3] - urllib3 [required: >=1.21.1,<1.27, installed: 1.26.9] setuptools==62.3.2 virtualenv==16.7.9 wheel==0.37.1
Dependency tree in py-executor
# pipdeptree ansible==2.8.5 - cryptography [required: Any, installed: 37.0.2] - cffi [required: >=1.12, installed: 1.15.0] - pycparser [required: Any, installed: 2.21] - jinja2 [required: Any, installed: 3.1.2] - MarkupSafe [required: >=2.0, installed: 2.1.1] - PyYAML [required: Any, installed: 6.0] cdscommon==0.1 - grpcio-tools [required: Any, installed: 1.25.0] - grpcio [required: >=1.25.0, installed: 1.25.0] - six [required: >=1.5.2, installed: 1.16.0] - protobuf [required: >=3.5.0.post1, installed: 4.21.1] ....
Executors throw this error
Command executor
Traceback (most recent call last): File "server.py", line 24, in <module> import utils File "/opt/app/onap/python/utils.py", line 18, in <module> import proto.CommandExecutor_pb2 as CommandExecutor_pb2 File "/opt/app/onap/python/proto/CommandExecutor_pb2.py", line 39, in <module> type=None), File "/usr/local/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__ _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower)
Py executor
CONFIGURATION environment variable is not set, using default. Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/onaplogging/logWatchDog.py", line 72, in _yamlConfig dictConfig = _yaml2Dict(filepath) File "/usr/local/lib/python3.7/site-packages/onaplogging/logWatchDog.py", line 29, in _yaml2Dict return yaml.load(f.read()) TypeError: load() missing 1 required positional argument: 'Loader' Traceback (most recent call last): File "server.py", line 27, in <module> from manager.servicer import ArtifactManagerServicer File "/usr/local/lib/python3.7/site-packages/manager/servicer.py", line 26, in <module> from proto.BluePrintManagement_pb2 import ( File "/usr/local/lib/python3.7/site-packages/proto/BluePrintManagement_pb2.py", line 16, in <module> import proto.BluePrintCommon_pb2 as BluePrintCommon__pb2 File "/usr/local/lib/python3.7/site-packages/proto/BluePrintCommon_pb2.py", line 37, in <module> create_key=_descriptor._internal_create_key), File "/usr/local/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__ _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).