Skip to content

Commit ffb557c

Browse files
lqiu96renovate-botcloud-java-bot
authored
deps: Bump grpc-java to v1.76.0 (#3942)
This PR bumps the gRPC gen code and runtime versions from `v1.71.0` to `v1.76.0`. - Notable in this version bump, the V2 gen code unary call API from gRPC now throws a new CheckedException `StatusException` that users will need to catch. This was part of gRPC 1.74.0 (grpc/grpc-java#12126) ## Changes - Bump the gRPC runtime in the pom to v1.76.0 - Bump the gRPC gen code version in the hermetic build docker image to v1.76.0 - Add new GraalVM configs for some JCTool classes. These classes are pulled in from gRPC -> shaded netty -> shaded JCTools. This came from gRPC-Java upgrading the Netty version to v4.1.124. Netty v4.1.115 uses a new method in JCTools (netty/netty#14426) - Update the WORKSPACE file to download `bazel_jar_jar` as part of this PR (grpc/grpc-java#12243) in gRPC-Java v1.75.0 --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
1 parent 9ad8a4d commit ffb557c

File tree

22 files changed

+253
-236
lines changed

22 files changed

+253
-236
lines changed

.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ steps:
6868
- |
6969
mvn dependency:copy \
7070
-B -ntp \
71-
-Dartifact=com.google.api:gapic-generator-java:2.55.1 \
71+
-Dartifact=com.google.api:gapic-generator-java:2.63.0 \
7272
-DoutputDirectory=/workspace
7373
cd /workspace
74-
mv gapic-generator-java-2.55.1.jar gapic-generator-java.jar
74+
mv gapic-generator-java-2.63.0.jar gapic-generator-java.jar
7575
id: prepare-generator-jar
7676
waitFor: [ "-" ]
7777

.cloudbuild/library_generation/library_generation.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ FROM docker.io/library/python:3.13.2-slim@sha256:6b3223eb4d93718828223966ad31690
3838

3939
ARG OWLBOT_CLI_COMMITTISH=3a68a9c0de318784b3aefadcc502a6521b3f1bc5
4040
ARG PROTOC_VERSION=25.8
41-
ARG GRPC_VERSION=1.71.0
41+
ARG GRPC_VERSION=1.76.0
4242
ENV HOME=/home
4343
ENV OS_ARCHITECTURE="linux-x86_64"
4444

.cloudbuild/library_generation/library_generation_airlock.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/python@sha256:afc
3939

4040
ARG OWLBOT_CLI_COMMITTISH=3a68a9c0de318784b3aefadcc502a6521b3f1bc5
4141
ARG PROTOC_VERSION=25.8
42-
ARG GRPC_VERSION=1.71.0
42+
ARG GRPC_VERSION=1.76.0
4343
ENV HOME=/home
4444
ENV OS_ARCHITECTURE="linux-x86_64"
4545

WORKSPACE

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,16 @@ load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
9797

9898
grpc_java_repositories()
9999

100-
load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
101-
102-
api_dependencies()
100+
# gRPC-Java uses jar_jar for bazel: https://github.com/grpc/grpc-java/pull/12243
101+
# The following lines are from jar_jar's README: https://github.com/bazeltools/bazel_jar_jar?tab=readme-ov-file#how-to-add-to-bazel-via-workspace
102+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
103+
git_repository(
104+
name = "bazel_jar_jar",
105+
commit = "4e7bf26da8bc8c955578fd8c8a2c763757d344df", # Latest commit SHA as of 2023/10/31
106+
remote = "https://github.com/bazeltools/bazel_jar_jar.git",
107+
)
108+
load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories")
109+
jar_jar_repositories()
103110

104111
_disco_to_proto3_converter_commit = "ce8d8732120cdfb5bf4847c3238b5be8acde87e3"
105112

gapic-generator-java-pom-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<!-- External dependencies, especially gRPC and Protobuf version, should be
2828
consistent across modules in this repository -->
2929
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
30-
<grpc.version>1.71.0</grpc.version>
30+
<grpc.version>1.76.0</grpc.version>
3131
<google.auth.version>1.40.0</google.auth.version>
3232
<google.http-client.version>2.0.2</google.http-client.version>
3333
<gson.version>2.12.1</gson.version>

gax-java/dependencies.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ version.gax_httpjson=2.71.1-SNAPSHOT
2828

2929
version.com_google_protobuf=3.25.8
3030
version.google_java_format=1.15.0
31-
version.io_grpc=1.71.0
31+
version.io_grpc=1.76.0
3232

3333
# Maven artifacts.
3434
# Note, the actual name of each property matters (bazel build scripts depend on it).

gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,21 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) {
148148
access,
149149
NETTY_SHADED_PACKAGE + "org.jctools.queues.MpscArrayQueueConsumerIndexField",
150150
"consumerIndex");
151+
registerForUnsafeFieldAccess(
152+
access,
153+
NETTY_SHADED_PACKAGE
154+
+ "org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerIndexField",
155+
"producerIndex");
156+
registerForUnsafeFieldAccess(
157+
access,
158+
NETTY_SHADED_PACKAGE
159+
+ "org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerLimitField",
160+
"producerLimit");
161+
registerForUnsafeFieldAccess(
162+
access,
163+
NETTY_SHADED_PACKAGE
164+
+ "org.jctools.queues.unpadded.MpscUnpaddedArrayQueueConsumerIndexField",
165+
"consumerIndex");
151166
registerForUnsafeFieldAccess(
152167
access,
153168
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields",
@@ -160,6 +175,21 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) {
160175
access,
161176
NETTY_SHADED_PACKAGE + "org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields",
162177
"consumerIndex");
178+
registerForUnsafeFieldAccess(
179+
access,
180+
NETTY_SHADED_PACKAGE
181+
+ "org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueueProducerFields",
182+
"producerIndex");
183+
registerForUnsafeFieldAccess(
184+
access,
185+
NETTY_SHADED_PACKAGE
186+
+ "org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueueColdProducerFields",
187+
"producerLimit");
188+
registerForUnsafeFieldAccess(
189+
access,
190+
NETTY_SHADED_PACKAGE
191+
+ "org.jctools.queues.unpadded.BaseMpscLinkedUnpaddedArrayQueueConsumerFields",
192+
"consumerIndex");
163193
}
164194
}
165195

java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
* [Location.metadata][google.cloud.location.Location.metadata] field.
2727
* </pre>
2828
*/
29-
@javax.annotation.Generated(
30-
value = "by gRPC proto compiler",
31-
comments = "Source: google/cloud/location/locations.proto")
3229
@io.grpc.stub.annotations.GrpcGenerated
3330
public final class LocationsGrpc {
3431

@@ -315,8 +312,8 @@ protected LocationsBlockingV2Stub build(
315312
* </pre>
316313
*/
317314
public com.google.cloud.location.ListLocationsResponse listLocations(
318-
com.google.cloud.location.ListLocationsRequest request) {
319-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
315+
com.google.cloud.location.ListLocationsRequest request) throws io.grpc.StatusException {
316+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
320317
getChannel(), getListLocationsMethod(), getCallOptions(), request);
321318
}
322319

@@ -328,8 +325,8 @@ public com.google.cloud.location.ListLocationsResponse listLocations(
328325
* </pre>
329326
*/
330327
public com.google.cloud.location.Location getLocation(
331-
com.google.cloud.location.GetLocationRequest request) {
332-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
328+
com.google.cloud.location.GetLocationRequest request) throws io.grpc.StatusException {
329+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
333330
getChannel(), getGetLocationMethod(), getCallOptions(), request);
334331
}
335332
}

java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
* developers can have a consistent client experience.
3232
* </pre>
3333
*/
34-
@javax.annotation.Generated(
35-
value = "by gRPC proto compiler",
36-
comments = "Source: google/longrunning/operations.proto")
3734
@io.grpc.stub.annotations.GrpcGenerated
3835
public final class OperationsGrpc {
3936

@@ -602,8 +599,8 @@ protected OperationsBlockingV2Stub build(
602599
* </pre>
603600
*/
604601
public com.google.longrunning.ListOperationsResponse listOperations(
605-
com.google.longrunning.ListOperationsRequest request) {
606-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
602+
com.google.longrunning.ListOperationsRequest request) throws io.grpc.StatusException {
603+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
607604
getChannel(), getListOperationsMethod(), getCallOptions(), request);
608605
}
609606

@@ -617,8 +614,8 @@ public com.google.longrunning.ListOperationsResponse listOperations(
617614
* </pre>
618615
*/
619616
public com.google.longrunning.Operation getOperation(
620-
com.google.longrunning.GetOperationRequest request) {
621-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
617+
com.google.longrunning.GetOperationRequest request) throws io.grpc.StatusException {
618+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
622619
getChannel(), getGetOperationMethod(), getCallOptions(), request);
623620
}
624621

@@ -633,8 +630,8 @@ public com.google.longrunning.Operation getOperation(
633630
* </pre>
634631
*/
635632
public com.google.protobuf.Empty deleteOperation(
636-
com.google.longrunning.DeleteOperationRequest request) {
637-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
633+
com.google.longrunning.DeleteOperationRequest request) throws io.grpc.StatusException {
634+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
638635
getChannel(), getDeleteOperationMethod(), getCallOptions(), request);
639636
}
640637

@@ -656,8 +653,8 @@ public com.google.protobuf.Empty deleteOperation(
656653
* </pre>
657654
*/
658655
public com.google.protobuf.Empty cancelOperation(
659-
com.google.longrunning.CancelOperationRequest request) {
660-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
656+
com.google.longrunning.CancelOperationRequest request) throws io.grpc.StatusException {
657+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
661658
getChannel(), getCancelOperationMethod(), getCallOptions(), request);
662659
}
663660

@@ -677,8 +674,8 @@ public com.google.protobuf.Empty cancelOperation(
677674
* </pre>
678675
*/
679676
public com.google.longrunning.Operation waitOperation(
680-
com.google.longrunning.WaitOperationRequest request) {
681-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
677+
com.google.longrunning.WaitOperationRequest request) throws io.grpc.StatusException {
678+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
682679
getChannel(), getWaitOperationMethod(), getCallOptions(), request);
683680
}
684681
}

java-iam/grpc-google-iam-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
* attached.
4242
* </pre>
4343
*/
44-
@javax.annotation.Generated(
45-
value = "by gRPC proto compiler",
46-
comments = "Source: google/iam/v1/iam_policy.proto")
4744
@io.grpc.stub.annotations.GrpcGenerated
4845
public final class IAMPolicyGrpc {
4946

@@ -473,8 +470,9 @@ protected IAMPolicyBlockingV2Stub build(
473470
* Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
474471
* </pre>
475472
*/
476-
public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {
477-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
473+
public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
474+
throws io.grpc.StatusException {
475+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
478476
getChannel(), getSetIamPolicyMethod(), getCallOptions(), request);
479477
}
480478

@@ -487,8 +485,9 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
487485
* set.
488486
* </pre>
489487
*/
490-
public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {
491-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
488+
public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
489+
throws io.grpc.StatusException {
490+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
492491
getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);
493492
}
494493

@@ -505,8 +504,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque
505504
* </pre>
506505
*/
507506
public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
508-
com.google.iam.v1.TestIamPermissionsRequest request) {
509-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
507+
com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException {
508+
return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
510509
getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request);
511510
}
512511
}

0 commit comments

Comments
 (0)