-
Notifications
You must be signed in to change notification settings - Fork 615
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
Add support to protobuf5 #4206
base: main
Are you sure you want to change the base?
Add support to protobuf5 #4206
Conversation
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
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.
Thanks Emidio!
opentelemetry-proto/pyproject.toml
Outdated
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.
Do you think we should major version bump this package? It's possible the API of generated code has changed
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.
Right. It does make sense to me. But I think we don't have an easy way to release the package individually, right?
_version_not_supported = first_version_is_lower( | ||
GRPC_VERSION, GRPC_GENERATED_VERSION | ||
) | ||
except ImportError: | ||
_version_not_supported = True | ||
|
||
if _version_not_supported: | ||
warnings.warn( |
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.
Any thoughts on how to protect users from this? Maybe we could use the oldest grpcio version supporting protobuf 5
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.
Not yet. I did some tests locally using a different version for runtime and got the warnings during the tests 😓
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.
Maybe we can re-generate the code using version 1.63.2
instead
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.
Yes, that would probably work. Apologies if you already know this, but IIRC you have to check what version of protoc and the grpc plugin are included in the grpcio-tools pypi package version.
$ python -m grpc_tools.protoc --version
libprotoc 26.1
And the version of libprotoc corresponds to the Python protobuf version in this table https://protobuf.dev/support/version-support/#python.
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.
Yeah I did that. From 1.63.0 it starts to use libprotoc 26.1
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.
Generated with 1.63.2. But this thing is worrying me:EXPECTED_ERROR_RELEASE = "1.65.0"
.
Signed-off-by: emdneto <[email protected]>
Description
Follow-up of this thread #3958 and continue the work from this PR #3931
Steps to generate