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

Update gRPC-Java to 1.30.0 #2814

Merged
merged 6 commits into from Jun 19, 2020
Merged

Update gRPC-Java to 1.30.0 #2814

merged 6 commits into from Jun 19, 2020

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Jun 18, 2020

Motivation:

gRPC-Java 1.30.0 has been released
We need a workaround for ProtoReflectionService. Because it does not implement InternalNotifyOnServerBuild anymore.
See grpc/grpc-java#6967 #2806
It is a temporary workaround until upstream handles grpc/grpc-java#7138.

Modifications:

  • Upgrade gRPC to 1.30.0 from 1.29.0
  • Add ProtoReflectionServiceInterceptor that injects dummy server to
    gRPC context.

Result:

You can run gRPC 1.30.0 with Armeria server.
Fixes #2806

Motivation:

gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released
We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore.
See grpc/grpc-java#6967 line#2806
It is a temporary workaround until upstream handles grpc/grpc-java#7138.

Motivations:

- Upgrade gRPC to 1.30.0 from 1.29.0
- Add ProtoReflectionServiceInterceptor that injects dummy server to
  gRPC context.

Result:

You can run gRPC 1.30.0 with Armeria server.
Fixes line#2806
@ikhoon ikhoon added this to the 0.99.7 milestone Jun 18, 2020
@ikhoon
Copy link
Contributor Author

ikhoon commented Jun 18, 2020

/cc @okue @anuraaga

static final ProtoReflectionServiceInterceptor INSTANCE = new ProtoReflectionServiceInterceptor();

@Nullable
private static Server dummyServer;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - is this supposed to be static? If so this interceptor can be static too, and yeah back to the idea we can call ProtoReflectionServiceInterceptor.addServerConfig() where we used to call notifyOnBuild

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replied at #2814 (comment)

Copy link
Member

@okue okue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update!

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ikhoon !

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If dummyServer is static, wouldn't it make two different gRPC Server instances provide the same dummyServer instance? Is it OK even if the two Servers have different gRPC services?

@trustin trustin self-requested a review June 18, 2020 11:05
@ikhoon
Copy link
Contributor Author

ikhoon commented Jun 18, 2020

If dummyServer is static, wouldn't it make two different gRPC Server instances provide the same dummyServer instance? Is it OK even if the two Servers have different gRPC services?

Ahh, I didn't think of that case. Thanks!

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #2814 into master will decrease coverage by 0.09%.
The diff coverage is 56.52%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2814      +/-   ##
============================================
- Coverage     72.78%   72.68%   -0.10%     
- Complexity    11945    11947       +2     
============================================
  Files          1049     1048       -1     
  Lines         46554    46626      +72     
  Branches       5810     5829      +19     
============================================
+ Hits          33883    33890       +7     
- Misses         9705     9744      +39     
- Partials       2966     2992      +26     
Impacted Files Coverage Δ Complexity Δ
.../example/armeria/grpc/kotlin/HelloServiceGrpc.java 48.83% <ø> (ø) 14.00 <0.00> (ø)
...c/main/java/example/armeria/grpc/kotlin/Hello.java 35.22% <ø> (ø) 2.00 <0.00> (ø)
...inecorp/armeria/server/grpc/FramedGrpcService.java 88.61% <50.00%> (+0.18%) 33.00 <2.00> (+1.00)
...necorp/armeria/server/grpc/GrpcServiceBuilder.java 71.18% <66.66%> (+0.49%) 17.00 <0.00> (ø)
...server/grpc/ProtoReflectionServiceInterceptor.java 66.66% <66.66%> (ø) 3.00 <3.00> (?)
...necorp/armeria/internal/common/brave/SpanTags.java 66.66% <0.00%> (-33.34%) 3.00% <0.00%> (-2.00%)
...inecorp/armeria/common/ClosedSessionException.java 36.36% <0.00%> (-18.19%) 4.00% <0.00%> (-1.00%)
...lient/retrofit2/RetrofitMeterIdPrefixFunction.java 77.08% <0.00%> (-15.78%) 11.00% <0.00%> (+1.00%) ⬇️
...om/linecorp/armeria/client/HttpSessionHandler.java 66.47% <0.00%> (-11.18%) 47.00% <0.00%> (-6.00%)
...com/linecorp/armeria/client/brave/BraveClient.java 80.32% <0.00%> (-9.84%) 12.00% <0.00%> (-3.00%)
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ead4d10...055af99. Read the comment docs.

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@trustin trustin merged commit 9913a3a into line:master Jun 19, 2020
@ikhoon ikhoon deleted the grpc-java-1.30.0 branch June 22, 2020 05:19
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this pull request Sep 19, 2020
Motivation:

gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released
We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore.
See grpc/grpc-java#6967 line#2806
It is a temporary workaround until upstream handles grpc/grpc-java#7138.

Modifications:

- Upgrade gRPC to 1.30.0 from 1.29.0
- Add ProtoReflectionServiceInterceptor that injects dummy server to
  gRPC context.

Result:

You can run gRPC 1.30.0 with Armeria server.
Fixes line#2806
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build with grpc-java:1.30.0 due to ProtoReflectionService change
5 participants