-
Notifications
You must be signed in to change notification settings - Fork 84
Regenerate remote_pb2.py with protoc 3.19.0 #1268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Used the same command from https://github.com/gnocchixyz/gnocchi/blob/master/gnocchi/rest/prometheus/README to recomplie remote_pb2.py file |
I think you need to change the version to be |
I agree that we should update the version requirement. I could not find any good material explaining the minimum version but I think >= 3.19.0 would be reasonable because the code is regenerated with protoc 3.19.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update setup.cfg. See conversations for further details.
b2c7cdd
to
d3096ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to define lower boundary but I'm not certain about the correct version so I'm good with the current version without it.
@tobias-urdin @mrunge please let me know your thoughts on this pull request |
Thanks for looking at this, I would like to know if we need to enforce a minimum version of protobuf package, anybody knows? |
We could set it to |
I guess we could do |
Execute "protoc --proto_path=. --python_out=. remote.proto" which regenerates remote_pb2.py to fix the following error ``` 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). More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates unable to load app 0 (mountpoint='') (callable not found or import error) ``` Fixes: gnocchixyz#1267 Signed-off-by: Yadnesh Kulkarni <[email protected]>
d3096ed
to
c5f5d5d
Compare
Pull request has been modified.
The Zed release upper-constraints [1] says that protobuf version >=4 is allowed which Gnocchi 4.4.x series does not support and that was introduced in 4.5.x so we should bump Gnocchi in Zed release to support that [2]. This bumps the minimum required version of protobuf to >=3.19 but that's fine since we use that for both c8s and c9s on Zed. [1] https://github.com/openstack/requirements/blob/stable/zed/upper-constraints.txt#L372 [2] gnocchixyz/gnocchi#1268 Change-Id: I1c2763f0d1da296140dea4a965be807d496097af
Execute "protoc --proto_path=. --python_out=. remote.proto" to
regenerate remote_pb2.py
Fixes: #1267
Signed-off-by: Yadnesh Kulkarni [email protected]