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

gRPC version upgrade #1776

Closed
jabubake opened this issue Mar 20, 2017 · 3 comments
Closed

gRPC version upgrade #1776

jabubake opened this issue Mar 20, 2017 · 3 comments
Assignees

Comments

@jabubake
Copy link
Contributor

Looks like certain version of Maven (2.2.1, 3.2.2 and 3.2.3) run into issues with com.google.code.gson:gson:2.3: google/gson#588
The issue is resolved in gson : 2.3.1.
The older version(2.3) is linked in google-cloud-core from grpc 1.0.3.
grpc 1.1+ support gson:2.7. Is there a reason not to be on atleast 1.1.x of grpc ?

[INFO] | | +- io.grpc:grpc-protobuf:jar:1.0.3:compile
[INFO] | | | +- (com.google.guava:guava:jar:19.0:compile - omitted for duplicate)
[INFO] | | | +- com.google.protobuf:protobuf-java-util:jar:3.0.2:compile
[INFO] | | | | +- (com.google.protobuf:protobuf-java:jar:3.0.2:compile - omitted for conflict with 3.0.0)
[INFO] | | | | +- (com.google.guava:guava:jar:18.0:compile - omitted for conflict with 20.0)
[INFO] | | | | - com.google.code.gson:gson:jar:2.3:compile

@buchgr
Copy link

buchgr commented Mar 21, 2017

tl;dr;
Yes to upgrading! :-)

There is another problem due to no fault of Google Cloud Java. gRPC 1.1.x and 1.0x aren't API compatible. This commit [1] changed the return type of NettyChannelBuilder.build() from ManagedChannelImpl (1.0.x) to ManagedChannel (1.1.0). By coincidence google-cloud-spanner uses ManagedChannel [2] and so the code still compiles with newer gRPC versions, but doesn't run. Here is the byte code version of SpannerOptions$NettyRpcChannelFactory#newChannel(String, int) with the class file taken from maven central version 0.10.0-beta. Notice, how it calls a method with a ManagedChannelImpl return type.

grpc breakage

[1] grpc/grpc-java@d17a7b5#diff-34c34e0485cd6a3ebabb1f46de341a1aL269
[2] https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java#L272

@garrettjonesgoogle
Copy link
Member

We already have this issue for upgrading grpc: #1691 ; work hasn't started yet.

We have also already pulled in a change in gax-java (googleapis/gax-java#208) to switch from NettyChannelBuilder to ManagedChannelBuilder. This is in master but hasn't been released yet.

@garrettjonesgoogle
Copy link
Member

Resolving this issue in favor of #1691 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants