Skip to content

Commit a67f0e2

Browse files
committed
Merge branch 'master' into ring-hash-proactive-connection
2 parents f5a4934 + 4bbf8ee commit a67f0e2

File tree

77 files changed

+1350
-1881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1350
-1881
lines changed

BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@rules_java//java:defs.bzl", "java_library", "java_plugin", "java_proto_library")
15+
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
16+
load("@rules_java//java:defs.bzl", "java_library", "java_plugin")
1617
load("@rules_jvm_external//:defs.bzl", "artifact")
1718
load(":java_grpc_library.bzl", "java_grpc_library")
1819

MODULE.bazel

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@ module(
88
# GRPC_DEPS_START
99
IO_GRPC_GRPC_JAVA_ARTIFACTS = [
1010
"com.google.android:annotations:4.1.1.4",
11-
"com.google.api.grpc:proto-google-common-protos:2.63.1",
12-
"com.google.auth:google-auth-library-credentials:1.40.0",
13-
"com.google.auth:google-auth-library-oauth2-http:1.40.0",
11+
"com.google.api.grpc:proto-google-common-protos:2.63.2",
12+
"com.google.auth:google-auth-library-credentials:1.41.0",
13+
"com.google.auth:google-auth-library-oauth2-http:1.41.0",
1414
"com.google.auto.value:auto-value-annotations:1.11.0",
1515
"com.google.auto.value:auto-value:1.11.0",
1616
"com.google.code.findbugs:jsr305:3.0.2",
1717
"com.google.code.gson:gson:2.12.1",
18-
"com.google.errorprone:error_prone_annotations:2.44.0",
18+
"com.google.errorprone:error_prone_annotations:2.45.0",
1919
"com.google.guava:failureaccess:1.0.1",
2020
"com.google.guava:guava:33.5.0-android",
2121
"com.google.re2j:re2j:1.8",
2222
"com.google.s2a.proto.v2:s2a-proto:0.1.3",
2323
"com.google.truth:truth:1.4.5",
2424
"com.squareup.okhttp:okhttp:2.7.5",
2525
"com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day
26-
"io.netty:netty-buffer:4.1.127.Final",
27-
"io.netty:netty-codec-http2:4.1.127.Final",
28-
"io.netty:netty-codec-http:4.1.127.Final",
29-
"io.netty:netty-codec-socks:4.1.127.Final",
30-
"io.netty:netty-codec:4.1.127.Final",
31-
"io.netty:netty-common:4.1.127.Final",
32-
"io.netty:netty-handler-proxy:4.1.127.Final",
33-
"io.netty:netty-handler:4.1.127.Final",
34-
"io.netty:netty-resolver:4.1.127.Final",
26+
"io.netty:netty-buffer:4.1.130.Final",
27+
"io.netty:netty-codec-http2:4.1.130.Final",
28+
"io.netty:netty-codec-http:4.1.130.Final",
29+
"io.netty:netty-codec-socks:4.1.130.Final",
30+
"io.netty:netty-codec:4.1.130.Final",
31+
"io.netty:netty-common:4.1.130.Final",
32+
"io.netty:netty-handler-proxy:4.1.130.Final",
33+
"io.netty:netty-handler:4.1.130.Final",
34+
"io.netty:netty-resolver:4.1.130.Final",
3535
"io.netty:netty-tcnative-boringssl-static:2.0.74.Final",
3636
"io.netty:netty-tcnative-classes:2.0.74.Final",
37-
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.127.Final",
38-
"io.netty:netty-transport-native-unix-common:4.1.127.Final",
39-
"io.netty:netty-transport:4.1.127.Final",
37+
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.130.Final",
38+
"io.netty:netty-transport-native-unix-common:4.1.130.Final",
39+
"io.netty:netty-transport:4.1.130.Final",
4040
"io.opencensus:opencensus-api:0.31.0",
4141
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
4242
"io.perfmark:perfmark-api:0.27.0",
@@ -46,10 +46,10 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
4646
]
4747
# GRPC_DEPS_END
4848

49-
bazel_dep(name = "bazel_jar_jar", version = "0.1.7")
49+
bazel_dep(name = "bazel_jar_jar", version = "0.1.11.bcr.1")
5050
bazel_dep(name = "bazel_skylib", version = "1.7.1")
5151
bazel_dep(name = "googleapis", version = "0.0.0-20240326-1c8d509c5", repo_name = "com_google_googleapis")
52-
bazel_dep(name = "grpc-proto", version = "0.0.0-20240627-ec30f58", repo_name = "io_grpc_grpc_proto")
52+
bazel_dep(name = "grpc-proto", version = "0.0.0-20240627-ec30f58.bcr.1", repo_name = "io_grpc_grpc_proto")
5353
bazel_dep(name = "protobuf", version = "33.1", repo_name = "com_google_protobuf")
5454
bazel_dep(name = "rules_cc", version = "0.0.9")
5555
bazel_dep(name = "rules_java", version = "9.1.0")

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
4444
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
4545
basics](https://grpc.io/docs/languages/java/basics).
4646

47-
The [examples](https://github.com/grpc/grpc-java/tree/v1.77.0/examples) and the
48-
[Android example](https://github.com/grpc/grpc-java/tree/v1.77.0/examples/android)
47+
The [examples](https://github.com/grpc/grpc-java/tree/v1.78.0/examples) and the
48+
[Android example](https://github.com/grpc/grpc-java/tree/v1.78.0/examples/android)
4949
are standalone projects that showcase the usage of gRPC.
5050

5151
Download
@@ -56,42 +56,42 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
5656
<dependency>
5757
<groupId>io.grpc</groupId>
5858
<artifactId>grpc-netty-shaded</artifactId>
59-
<version>1.77.0</version>
59+
<version>1.78.0</version>
6060
<scope>runtime</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>io.grpc</groupId>
6464
<artifactId>grpc-protobuf</artifactId>
65-
<version>1.77.0</version>
65+
<version>1.78.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>io.grpc</groupId>
6969
<artifactId>grpc-stub</artifactId>
70-
<version>1.77.0</version>
70+
<version>1.78.0</version>
7171
</dependency>
7272
```
7373

7474
Or for Gradle with non-Android, add to your dependencies:
7575
```gradle
76-
runtimeOnly 'io.grpc:grpc-netty-shaded:1.77.0'
77-
implementation 'io.grpc:grpc-protobuf:1.77.0'
78-
implementation 'io.grpc:grpc-stub:1.77.0'
76+
runtimeOnly 'io.grpc:grpc-netty-shaded:1.78.0'
77+
implementation 'io.grpc:grpc-protobuf:1.78.0'
78+
implementation 'io.grpc:grpc-stub:1.78.0'
7979
```
8080

8181
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
8282
`grpc-protobuf-lite` instead of `grpc-protobuf`:
8383
```gradle
84-
implementation 'io.grpc:grpc-okhttp:1.77.0'
85-
implementation 'io.grpc:grpc-protobuf-lite:1.77.0'
86-
implementation 'io.grpc:grpc-stub:1.77.0'
84+
implementation 'io.grpc:grpc-okhttp:1.78.0'
85+
implementation 'io.grpc:grpc-protobuf-lite:1.78.0'
86+
implementation 'io.grpc:grpc-stub:1.78.0'
8787
```
8888

8989
For [Bazel](https://bazel.build), you can either
9090
[use Maven](https://github.com/bazelbuild/rules_jvm_external)
9191
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
9292

9393
[the JARs]:
94-
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.77.0
94+
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.78.0
9595

9696
Development snapshots are available in [Sonatypes's snapshot
9797
repository](https://central.sonatype.com/repository/maven-snapshots/).
@@ -123,7 +123,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
123123
<configuration>
124124
<protocArtifact>com.google.protobuf:protoc:3.25.8:exe:${os.detected.classifier}</protocArtifact>
125125
<pluginId>grpc-java</pluginId>
126-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.77.0:exe:${os.detected.classifier}</pluginArtifact>
126+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.78.0:exe:${os.detected.classifier}</pluginArtifact>
127127
</configuration>
128128
<executions>
129129
<execution>
@@ -153,7 +153,7 @@ protobuf {
153153
}
154154
plugins {
155155
grpc {
156-
artifact = 'io.grpc:protoc-gen-grpc-java:1.77.0'
156+
artifact = 'io.grpc:protoc-gen-grpc-java:1.78.0'
157157
}
158158
}
159159
generateProtoTasks {
@@ -186,7 +186,7 @@ protobuf {
186186
}
187187
plugins {
188188
grpc {
189-
artifact = 'io.grpc:protoc-gen-grpc-java:1.77.0'
189+
artifact = 'io.grpc:protoc-gen-grpc-java:1.78.0'
190190
}
191191
}
192192
generateProtoTasks {

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ grpc-netty version | netty-handler version | netty-tcnative-boringssl-static ver
398398
1.67.x-1.70.x | 4.1.110.Final | 2.0.65.Final
399399
1.71.x-1.74.x | 4.1.110.Final | 2.0.70.Final
400400
1.75.x-1.76.x | 4.1.124.Final | 2.0.72.Final
401-
1.77.x- | 4.1.127.Final | 2.0.74.Final
401+
1.77.x-1.78.x | 4.1.127.Final | 2.0.74.Final
402+
1.79.x- | 4.1.130.Final | 2.0.74.Final
402403

403404
_(grpc-netty-shaded avoids issues with keeping these versions in sync.)_
404405

WORKSPACE

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,34 @@
11
workspace(name = "io_grpc_grpc_java")
22

33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4+
load("//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS", "grpc_java_repositories")
45

5-
http_archive(
6-
name = "bazel_features",
7-
sha256 = "a660027f5a87f13224ab54b8dc6e191693c554f2692fcca46e8e29ee7dabc43b",
8-
strip_prefix = "bazel_features-1.30.0",
9-
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.30.0/bazel_features-v1.30.0.tar.gz",
10-
)
11-
12-
load("@bazel_features//:deps.bzl", "bazel_features_deps")
13-
14-
bazel_features_deps()
6+
grpc_java_repositories()
157

168
http_archive(
179
name = "rules_java",
18-
sha256 = "4e1a28a25c2efa53500c928d22ceffbc505dd95b335a2d025836a293b592212f",
10+
sha256 = "47632cc506c858011853073449801d648e10483d4b50e080ec2549a4b2398960",
1911
urls = [
20-
"https://github.com/bazelbuild/rules_java/releases/download/9.1.0/rules_java-9.1.0.tar.gz",
12+
"https://github.com/bazelbuild/rules_java/releases/download/8.15.2/rules_java-8.15.2.tar.gz",
2113
],
2214
)
2315

24-
load("@rules_java//java:rules_java_deps.bzl", "compatibility_proxy_repo")
16+
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
2517

26-
compatibility_proxy_repo()
18+
protobuf_deps()
2719

28-
http_archive(
29-
name = "rules_jvm_external",
30-
sha256 = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac",
31-
strip_prefix = "rules_jvm_external-5.3",
32-
url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/5.3/rules_jvm_external-5.3.tar.gz",
33-
)
20+
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
3421

35-
load("@rules_jvm_external//:defs.bzl", "maven_install")
36-
load("//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS", "grpc_java_repositories")
22+
rules_java_dependencies()
3723

38-
grpc_java_repositories()
24+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
25+
26+
bazel_features_deps()
3927

4028
load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories")
4129

4230
jar_jar_repositories()
4331

44-
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
45-
46-
protobuf_deps()
47-
4832
load("@rules_python//python:repositories.bzl", "py_repositories")
4933

5034
py_repositories()
@@ -55,6 +39,15 @@ switched_rules_by_language(
5539
name = "com_google_googleapis_imports",
5640
)
5741

42+
http_archive(
43+
name = "rules_jvm_external",
44+
sha256 = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac",
45+
strip_prefix = "rules_jvm_external-5.3",
46+
url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/5.3/rules_jvm_external-5.3.tar.gz",
47+
)
48+
49+
load("@rules_jvm_external//:defs.bzl", "maven_install")
50+
5851
maven_install(
5952
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS + PROTOBUF_MAVEN_ARTIFACTS,
6053
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,

alts/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
12
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
2-
load("@rules_java//java:defs.bzl", "java_library", "java_proto_library")
3+
load("@rules_java//java:defs.bzl", "java_library")
34
load("@rules_jvm_external//:defs.bzl", "artifact")
45
load("//:java_grpc_library.bzl", "java_grpc_library")
56

binder/src/androidTest/java/io/grpc/binder/internal/BinderClientTransportTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import io.grpc.internal.ClientStream;
5050
import io.grpc.internal.ClientStreamListener;
5151
import io.grpc.internal.ClientTransportFactory.ClientTransportOptions;
52+
import io.grpc.internal.DisconnectError;
5253
import io.grpc.internal.FixedObjectPool;
5354
import io.grpc.internal.ManagedClientTransport;
5455
import io.grpc.internal.ObjectPool;
@@ -529,7 +530,7 @@ private static final class TestTransportListener implements ManagedClientTranspo
529530
private final SettableFuture<Boolean> isTerminated = SettableFuture.create();
530531

531532
@Override
532-
public void transportShutdown(Status shutdownStatus) {
533+
public void transportShutdown(Status shutdownStatus, DisconnectError disconnectError) {
533534
if (!this.shutdownStatus.set(shutdownStatus)) {
534535
throw new IllegalStateException("transportShutdown() already called");
535536
}

binder/src/main/java/io/grpc/binder/internal/BinderClientTransport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import io.grpc.internal.GrpcUtil;
5757
import io.grpc.internal.ManagedClientTransport;
5858
import io.grpc.internal.ObjectPool;
59+
import io.grpc.internal.SimpleDisconnectError;
5960
import io.grpc.internal.StatsTraceContext;
6061
import java.util.concurrent.Executor;
6162
import java.util.concurrent.ScheduledFuture;
@@ -305,7 +306,7 @@ public synchronized void shutdownNow(Status reason) {
305306
@Override
306307
@GuardedBy("this")
307308
void notifyShutdown(Status status) {
308-
clientTransportListener.transportShutdown(status);
309+
clientTransportListener.transportShutdown(status, SimpleDisconnectError.UNKNOWN);
309310
}
310311

311312
@Override

binder/src/test/java/io/grpc/binder/internal/RobolectricBinderTransportTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import static io.grpc.binder.internal.BinderTransport.WIRE_FORMAT_VERSION;
2727
import static java.util.concurrent.TimeUnit.MILLISECONDS;
2828
import static org.junit.Assume.assumeTrue;
29+
import static org.mockito.ArgumentMatchers.any;
2930
import static org.mockito.ArgumentMatchers.anyLong;
3031
import static org.mockito.Mockito.mock;
3132
import static org.mockito.Mockito.never;
@@ -58,6 +59,7 @@
5859
import io.grpc.internal.ClientTransport;
5960
import io.grpc.internal.ClientTransportFactory.ClientTransportOptions;
6061
import io.grpc.internal.ConnectionClientTransport;
62+
import io.grpc.internal.DisconnectError;
6163
import io.grpc.internal.GrpcUtil;
6264
import io.grpc.internal.InternalServer;
6365
import io.grpc.internal.ManagedClientTransport;
@@ -357,7 +359,7 @@ public void clientIgnoresTransactionFromNonServerUids() throws Exception {
357359
sendShutdownTransportTransactionAsUid(client, serverUid);
358360

359361
verify(mockClientTransportListener, timeout(TIMEOUT_MS))
360-
.transportShutdown(statusCaptor.capture());
362+
.transportShutdown(statusCaptor.capture(), any(DisconnectError.class));
361363
assertThat(statusCaptor.getValue().getCode()).isEqualTo(Status.Code.UNAVAILABLE);
362364
assertThat(statusCaptor.getValue().getDescription()).contains("shutdown");
363365
}
@@ -386,7 +388,7 @@ public void clientReportsAuthzErrorToServer() throws Exception {
386388
.build();
387389
runIfNotNull(client.start(mockClientTransportListener));
388390
verify(mockClientTransportListener, timeout(TIMEOUT_MS))
389-
.transportShutdown(statusCaptor.capture());
391+
.transportShutdown(statusCaptor.capture(), any(DisconnectError.class));
390392
assertThat(statusCaptor.getValue().getCode()).isEqualTo(Status.Code.PERMISSION_DENIED);
391393

392394
// Client doesn't tell the server in this case by design -- we don't even want to start it!

0 commit comments

Comments
 (0)