-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Update to Protobuf 4.x #11015
Comments
https://protobuf.dev/news/2023-12-05 Also, I'm wondering how this protobuf changes will affect
|
The protobuf breakage is pretty serious and goes against wisdom like https://jlbp.dev/JLBP-7 . I don't see how the community can absorb it. googleapis libraries are hit even harder than we are, so I think we'd wait until they have an idea how to deal with this (otherwise they couldn't upgrade to newer grpc versions). I don't expect that to be too big of a problem for the community, as I think most protobuf-using projects will be in shock. I'm in discussions with others, but I'd expect the process to figure this out to take months. |
After updating to Protobuf 4.26.0, we observe this issue:
The announcement of the Protobuf release contains this: So I guess this has to be adjusted. |
@neeme-praks-sympower Does any library or dependency require you to upgrade Protobuf runtime version to 4.x? |
It seems that |
Motivation: - grpc-java is not fully compatible with Protobuf 4; see: grpc/grpc-java#11015 - Protobuf 4 breaks our demo server due to an incompatibility between the generated code and what the grpc-java library expects. Modifications: - Downgrade to Protobuf 3 on all projects. - Prevent upgrade to Protobuf 4 in dependabot.yml (note: scala-steward doesn't seem to pick up Protobuf updates anyway, probably because it's not configured as a library dependency per se). Result: Stick to Protobuf 3 for now.
Motivation: - grpc-java is not fully compatible with Protobuf 4; see: grpc/grpc-java#11015 - Protobuf 4 breaks our demo server due to an incompatibility between the generated code and what the grpc-java library expects. Modifications: - Downgrade to Protobuf 3 on all projects. - Prevent upgrade to Protobuf 4 in dependabot.yml (note: scala-steward doesn't seem to pick up Protobuf updates anyway, probably because it's not configured as a library dependency per se). Result: Stick to Protobuf 3 for now.
Motivation: - grpc-java is not fully compatible with Protobuf 4; see: grpc/grpc-java#11015 - Protobuf 4 breaks our demo server due to an incompatibility between the generated code and what the grpc-java library expects. Modifications: - Downgrade to Protobuf 3 on all projects. - Prevent upgrade to Protobuf 4 in dependabot.yml (note: scala-steward doesn't seem to pick up Protobuf updates anyway, probably because it's not configured as a library dependency per se). Result: Stick to Protobuf 3 for now.
Why couldn't grpc just bring back generated message v3? The classes appear almost identical, I suppose it can just extend it? I tried that myself - it somewhat worked. I got past the generated message v3 error, but I was getting serializaiton errors everywhere. I think they may have changed the serializaiton spec too? Anyway, I'm looking forward to this fix. I might try this again today. |
No. We just try to keep our dependencies up-to-date. |
@neeme-praks-sympower Thank you. |
I've opened an issue at Protobuf for restoring |
I didn't think you're going to win that though It was a major upgrade with breaking changes. They deprecated V3 awhile ago, better to fix instead of bringing it back. It'll take some time, but GRPC isn't always caught up to the latest protocol buffers. |
opencensus-proto is old generated code, which is not compatible with protobuf-java 4.27.2 and may not be fixed since the project is dead. Since it is unused, I think this doesn't cause any trouble for downstream users trying to use protobuf-java 4.x. Related to grpc#11015.
Appears the further issues may be resolved soon. Testing with the 4.28.0-RC3 looked good to me. protocolbuffers/protobuf#17247 (comment) |
Protobuf 27.4 was released yesterday. We're targeting upgrading in 1.67. |
do we have a timescale for this, out of curiosity? |
@ascopes, "We're targeting upgrading in 1.67". The schedule for 1.67 is in the milestone (Sept 17th). But you don't have to wait on us. You can upgrade protobuf today in your own app. |
@ejona86 thanks, was asking as on the most recent version of protobuf and gRPC, the introspection service for gRPC-java was still failing due to the use of v3 APIs within protobuf. |
@ascopes, use protobuf-java 4.27.4 or later. |
thanks, shall give it a try. |
Was wondering if there are any updates on this? From what I can tell there is still no update, and it's not targeted for 1.69 either? |
The current plan is "wait and see." We're staying on 3.x until it seems our downstreams are successfully upgrading to 4.x. Basically, we're waiting until it is clear the ecosystem is compatible compatible with 4.x. That is most safely done from the leaves of dependency trees up to the root. Notably, Google Cloud Java has a separate BOM for protobuf java 3.x, which is identical to the regular BOM except which protobuf-java runtime version it uses. They're watching the uptake of the 4.x version and we're talking with a few larger companies to see if there's common libraries that need fixes before being compatible with 4.x. Us staying on 3.x shouldn't impact anyone for now. But we do encourage using 4.x when able so that you're more prepared for protobuf-java 5.x. If one of your dependencies isn't compatible with 4.x, please file an issue with them (and if it is a commonly-used library/project, you can share a link to the issue here for our tracking). |
Edit by @ejona86: Protobuf has resolved the incompatibility with protobuf-java 4.x. Use protobuf-java 4.27.4 or later. This is being left open a bit longer for gRPC itself to upgrade, but you don't need to wait for gRPC.
Is your feature request related to a problem?
I would like to use the latest released version of Protobuf (4.26.0) but I cannot as gRPC is still using the old version.
Describe the solution you'd like
Update Protobuf dependency and make it work with the new version.
Describe alternatives you've considered
I hoped that the update would be easy (just a version bump) so I tried doing it myself but it resulted in a compilation failure so I'll leave it to you to figure it out.
The failure:
The text was updated successfully, but these errors were encountered: