-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Automate Protobuf Version Templating #24911
Conversation
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.
LGTM for the general idea, but some tests seem to be failing.
Btw the |
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.
LGTM if we don't change "install_requires" for now.
Unrelated failure: #24937 |
Fixes #24897Since both theprotobuf
andgrpcio-tools
packages includelibprotobuf
as a shared library, an application loading both of them has symbol conflicts that need to be resolved by the operating system's runtime linker. In most cases, the runtime linker uses the first loaded symbol, ignoring the second. In corner cases, such as in MacOS in #24897, some startup functions were run by the version fromgrpcio-tools
while the version packaged withprotobuf
was called at runtime. This resulted in corruption from the perspective of the version oflibprotobuf
packaged by theprotobuf
wheel because internal data structures had changed between the two versions.By requiring an exact version, this is no longer an issue. This also brings Python into line with other wrapped languages, including Ruby, C#, and Objective-C.Since updating the Protobuf version has been a tedious manual process in the past, I went ahead and pulled all languages into the templating system so in the future, only one instance of the protobuf version string will have to be changed -- inbuild_handwritten.yaml
.CC @jtattermusch since some of these changes will have to be reconciled with #24855. Once this is merged, I'll update the "Updating third_party/protobuf submodule in grpc" document accordingly.
CC @yulin-liang since this also touches Obj C files.
Update: @lidizheng made the good point that the protobuf Python package has much narrower platform support than we do, so pinning the version would be too restrictive. I've removed that portion of the PR so that this is now just an automation change for updaing the protobuf version. I'll address #24897 in a series of follow-up PRs.