Skip to content
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

Regenerate remote_pb2.py with protoc 3.19.0 #1268

Merged
merged 1 commit into from Aug 10, 2022

Conversation

yadneshk
Copy link
Contributor

@yadneshk yadneshk commented Aug 5, 2022

Execute "protoc --proto_path=. --python_out=. remote.proto" to
regenerate remote_pb2.py

Fixes: #1267

Signed-off-by: Yadnesh Kulkarni ykulkarn@redhat.com

@yadneshk
Copy link
Contributor Author

yadneshk commented Aug 5, 2022

Used the same command from https://github.com/gnocchixyz/gnocchi/blob/master/gnocchi/rest/prometheus/README to recomplie remote_pb2.py file

@eyalb1
Copy link
Contributor

eyalb1 commented Aug 9, 2022

I think you need to change the version to be >4.0.0
https://github.com/gnocchixyz/gnocchi/blob/master/setup.cfg#L84

@kajinamit
Copy link
Contributor

I think you need to change the version to be >4.0.0 https://github.com/gnocchixyz/gnocchi/blob/master/setup.cfg#L84

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

Copy link
Contributor

@kajinamit kajinamit left a 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.

Copy link
Contributor

@kajinamit kajinamit left a 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.

@yadneshk
Copy link
Contributor Author

@tobias-urdin @mrunge please let me know your thoughts on this pull request

@tobias-urdin
Copy link
Contributor

Thanks for looking at this, I would like to know if we need to enforce a minimum version of protobuf package, anybody knows?

@yadneshk
Copy link
Contributor Author

We could set it to protobuf>=4.21.1

@tobias-urdin
Copy link
Contributor

I guess we could do >= 3.19.0 since that's what the error message says, since the unpin here works with latest protobuf. We need 3.19 as well since we still support Python 3.6

setup.cfg Outdated Show resolved Hide resolved
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 <ykulkarn@redhat.com>
@mergify mergify bot dismissed tobias-urdin’s stale review August 10, 2022 13:21

Pull request has been modified.

@mergify mergify bot merged commit 39d4f86 into gnocchixyz:master Aug 10, 2022
rdoproject pushed a commit to rdo-packages/gnocchi-distgit that referenced this pull request Sep 20, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Updated protobuf module fails Gnocchi installation in devstack
4 participants