Upgrade dependencies post v1.57.x branch cut (#10359)

### Dependency updates

#### Update successfully to the latest
- [x] `androidx.core:core 1.10.0 -> 1.10.1`
- [x] `com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0`
- [x] `com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5`
- [x] `com.google.truth:truth 1.0.1 -> 1.1.5`
- [x] `com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1`
- [x] `org.robolectric:robolectric 4.9.2 -> 4.10.3`
- [x] Auto-value
   - [x] `com.google.auto.value:auto-value 1.10.1 -> 1.10.2`
   - [x] `com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2`
- [x] Protobuf
   - [x] `com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protoc 3.22.3 -> 3.23.4`
- [x] Errorprone
   - [x] `com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0`
   - [x] `com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0`
   - ~`libs.checkstylejava8 = com.puppycrawl.tools:checkstyle 9.3 -> 10.12.1`~ -- pinned to last version supporting java8, update not needed

#### Updated to non-latest
- [x] `com.squareup.okio:okio 1.17.5 ->` ~`3.4.0`~ `2.10.0` -- updating to 3.x failed due to them [introducing gradle multiplatform artifacts](https://github.com/square/okio/blob/master/CHANGELOG.md#version-320). Error in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632853307.).
- [x] `org.checkerframework:checker-qual 3.33.0 ->` ~`3.36.0`~ -- removed, no longer needed
- [x] Mockito - updated to `4.11.0`. Versions 5.x break some tests. Errors in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435).
   - `org.mockito:mockito-android 3.12.4 ->` ~`5.4.0`~ `4.11.0`
   - `org.mockito:mockito-core 3.12.4 ->` ~`5.4.0`~ `4.11.0`

#### Not updated
- Cronet -- upgrade failed, created a blocker ticket https://github.com/grpc/grpc-java/issues/10396
   - ~`org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61`~
   - ~`org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61`~
- Google auth -- upgrade blocked by https://github.com/grpc/grpc-java/pull/9118
   - ~`com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0`~
   - ~`com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0`~
- Guava -- not upgraded: 32.1.0 [broke gradle modules](https://github.com/google/guava/releases/tag/v32.1.0)
   - ~`libs.guava = com.google.guava:guava 32.0.1-android -> 32.1.1-jre`~
   - ~`libs.guava.jre = com.google.guava:guava 32.0.1-jre -> 32.1.1-jre`~
   - ~`libs.guava.testlib = com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre`~


### checkForUpdates results
```
> Task :checkForUpdates
androidx.core:core 1.10.0 -> 1.10.1
com.google.auto.value:auto-value 1.10.1 -> 1.10.2
com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2
org.checkerframework:checker-qual 3.33.0 -> 3.36.0
com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1
org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61
org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61
com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0
com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0
com.google.errorprone:error_prone_core 2.10.0 -> 2.20.0
com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0
com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0
com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0
com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5
com.google.guava:guava 32.0.1-android -> 32.1.1-jre
com.google.guava:guava 32.0.1-jre -> 32.1.1-jre
com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre
org.mockito:mockito-android 3.12.4 -> 5.4.0
org.mockito:mockito-core 3.12.4 -> 5.4.0
com.squareup.okio:okio 1.17.5 -> 3.4.0
com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4
com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4
com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4
com.google.protobuf:protoc 3.22.3 -> 3.23.4
org.robolectric:robolectric 4.9.2 -> 4.10.3
com.google.truth:truth 1.0.1 -> 1.1.5
```
This commit is contained in:
Sergii Tkachenko 2023-07-21 13:15:05 -04:00 committed by GitHub
parent 9f78b2bd3c
commit 419767f968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 188 additions and 158 deletions

View File

@ -129,7 +129,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
<artifactId>protobuf-maven-plugin</artifactId> <artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version> <version>0.6.1</version>
<configuration> <configuration>
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact> <protocArtifact>com.google.protobuf:protoc:3.23.4:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId> <pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.0:exe:${os.detected.classifier}</pluginArtifact> <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration> </configuration>
@ -157,7 +157,7 @@ plugins {
protobuf { protobuf {
protoc { protoc {
artifact = "com.google.protobuf:protoc:3.22.3" artifact = "com.google.protobuf:protoc:3.23.4"
} }
plugins { plugins {
grpc { grpc {
@ -190,7 +190,7 @@ plugins {
protobuf { protobuf {
protoc { protoc {
artifact = "com.google.protobuf:protoc:3.22.3" artifact = "com.google.protobuf:protoc:3.23.4"
} }
plugins { plugins {
grpc { grpc {

View File

@ -808,7 +808,7 @@ public class Context {
* <p>Calling {@code cancel(null)} is the same as calling {@link #close}. * <p>Calling {@code cancel(null)} is the same as calling {@link #close}.
* *
* @return {@code true} if this context cancelled the context and notified listeners, * @return {@code true} if this context cancelled the context and notified listeners,
* {@code false} if the context was already cancelled. * {@code false} if the context was already cancelled.
*/ */
@CanIgnoreReturnValue @CanIgnoreReturnValue
public boolean cancel(Throwable cause) { public boolean cancel(Throwable cause) {

View File

@ -571,10 +571,10 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* return o; * return o;
* }}</pre> * }}</pre>
* *
* @return this
* @throws IllegalArgumentException When the given serviceConfig is invalid or the current version * @throws IllegalArgumentException When the given serviceConfig is invalid or the current version
* of grpc library can not parse it gracefully. The state of the builder is unchanged if * of grpc library can not parse it gracefully. The state of the builder is unchanged if
* an exception is thrown. * an exception is thrown.
* @return this
* @since 1.20.0 * @since 1.20.0
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/5189") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/5189")

View File

@ -291,23 +291,23 @@ public final class ServerInterceptors {
final Metadata headers) { final Metadata headers) {
final ServerCall<OReqT, ORespT> unwrappedCall = final ServerCall<OReqT, ORespT> unwrappedCall =
new PartialForwardingServerCall<OReqT, ORespT>() { new PartialForwardingServerCall<OReqT, ORespT>() {
@Override @Override
protected ServerCall<WReqT, WRespT> delegate() { protected ServerCall<WReqT, WRespT> delegate() {
return call; return call;
} }
@Override @Override
public void sendMessage(ORespT message) { public void sendMessage(ORespT message) {
final InputStream is = originalMethod.streamResponse(message); final InputStream is = originalMethod.streamResponse(message);
final WRespT wrappedMessage = wrappedMethod.parseResponse(is); final WRespT wrappedMessage = wrappedMethod.parseResponse(is);
delegate().sendMessage(wrappedMessage); delegate().sendMessage(wrappedMessage);
} }
@Override @Override
public MethodDescriptor<OReqT, ORespT> getMethodDescriptor() { public MethodDescriptor<OReqT, ORespT> getMethodDescriptor() {
return originalMethod; return originalMethod;
} }
}; };
final ServerCall.Listener<OReqT> originalListener = originalHandler final ServerCall.Listener<OReqT> originalListener = originalHandler
.startCall(unwrappedCall, headers); .startCall(unwrappedCall, headers);

View File

@ -48,7 +48,7 @@ public class ForwardingServerCallTest {
protected ServerCall<Integer, Integer> delegate() { protected ServerCall<Integer, Integer> delegate() {
return serverCall; return serverCall;
} }
}; };
} }
@Test @Test

View File

@ -54,16 +54,16 @@ public class MetadataTest {
private static final Metadata.BinaryMarshaller<Fish> FISH_MARSHALLER = private static final Metadata.BinaryMarshaller<Fish> FISH_MARSHALLER =
new Metadata.BinaryMarshaller<Fish>() { new Metadata.BinaryMarshaller<Fish>() {
@Override @Override
public byte[] toBytes(Fish fish) { public byte[] toBytes(Fish fish) {
return fish.name.getBytes(UTF_8); return fish.name.getBytes(UTF_8);
} }
@Override @Override
public Fish parseBytes(byte[] serialized) { public Fish parseBytes(byte[] serialized) {
return new Fish(new String(serialized, UTF_8)); return new Fish(new String(serialized, UTF_8));
} }
}; };
private static class FishStreamMarsaller implements Metadata.BinaryStreamMarshaller<Fish> { private static class FishStreamMarsaller implements Metadata.BinaryStreamMarshaller<Fish> {
@Override @Override
@ -100,16 +100,16 @@ public class MetadataTest {
private static final Metadata.BinaryStreamMarshaller<Fish> IMMUTABLE_FISH_MARSHALLER = private static final Metadata.BinaryStreamMarshaller<Fish> IMMUTABLE_FISH_MARSHALLER =
new Metadata.BinaryStreamMarshaller<Fish>() { new Metadata.BinaryStreamMarshaller<Fish>() {
@Override @Override
public InputStream toStream(Fish fish) { public InputStream toStream(Fish fish) {
return new FakeFishStream(fish); return new FakeFishStream(fish);
} }
@Override @Override
public Fish parseStream(InputStream stream) { public Fish parseStream(InputStream stream) {
return ((FakeFishStream) stream).fish; return ((FakeFishStream) stream).fish;
} }
}; };
private static final String LANCE = "lance"; private static final String LANCE = "lance";
private static final byte[] LANCE_BYTES = LANCE.getBytes(US_ASCII); private static final byte[] LANCE_BYTES = LANCE.getBytes(US_ASCII);
@ -313,6 +313,7 @@ public class MetadataTest {
} }
@Test @Test
@SuppressWarnings("StringCaseLocaleUsage") // System locale is exactly what we're testing.
public void testKeyCaseHandling() { public void testKeyCaseHandling() {
Locale originalLocale = Locale.getDefault(); Locale originalLocale = Locale.getDefault();
Locale.setDefault(new Locale("tr", "TR")); Locale.setDefault(new Locale("tr", "TR"));

View File

@ -54,15 +54,13 @@ public class StatusRuntimeExceptionTest {
@Test @Test
public void extendAndOverridePreservesStack() { public void extendAndOverridePreservesStack() {
final StackTraceElement element = new StackTraceElement("a", "b", "c", 4); final StackTraceElement element = new StackTraceElement("a", "b", "c", 4);
StatusRuntimeException exception = StatusRuntimeException error = new StatusRuntimeException(Status.CANCELLED, new Metadata()) {
new StatusRuntimeException(Status.CANCELLED, new Metadata()) {
@Override @Override
public synchronized Throwable fillInStackTrace() { public synchronized Throwable fillInStackTrace() {
setStackTrace(new StackTraceElement[]{element}); setStackTrace(new StackTraceElement[]{element});
return this; return this;
} }
}; };
assertThat(exception.getStackTrace()).asList().containsExactly(element); assertThat(error.getStackTrace()).asList().containsExactly(element);
} }
} }

View File

@ -78,6 +78,7 @@ public abstract class AbstractBenchmark {
SMALL(10), MEDIUM(1024), LARGE(65536), JUMBO(1048576); SMALL(10), MEDIUM(1024), LARGE(65536), JUMBO(1048576);
private final int bytes; private final int bytes;
MessageSize(int bytes) { MessageSize(int bytes) {
this.bytes = bytes; this.bytes = bytes;
} }
@ -94,6 +95,7 @@ public abstract class AbstractBenchmark {
SMALL(16383), MEDIUM(65535), LARGE(1048575), JUMBO(8388607); SMALL(16383), MEDIUM(65535), LARGE(1048575), JUMBO(8388607);
private final int bytes; private final int bytes;
FlowWindowSize(int bytes) { FlowWindowSize(int bytes) {
this.bytes = bytes; this.bytes = bytes;
} }

View File

@ -162,7 +162,8 @@ subprojects {
checkstyle { checkstyle {
configDirectory = file("$rootDir/buildscripts") configDirectory = file("$rootDir/buildscripts")
toolVersion = libs.checkstyle.get().version toolVersion = JavaVersion.current().isJava11Compatible() ? libs.checkstyle.get().version : libs.checkstylejava8.get().version
ignoreFailures = false ignoreFailures = false
if (rootProject.hasProperty("checkstyle.ignoreFailures")) { if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean() ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()
@ -245,6 +246,11 @@ subprojects {
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF) options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
// The warning fails to provide a source location // The warning fails to provide a source location
options.errorprone.check("MissingSummary", CheckSeverity.OFF) options.errorprone.check("MissingSummary", CheckSeverity.OFF)
// TODO(https://github.com/grpc/grpc-java/issues/10372): remove when fixed.
if (JavaVersion.current().isJava11Compatible()) {
options.errorprone.check("StringCaseLocaleUsage", CheckSeverity.OFF)
}
} }
tasks.named("compileTestJava").configure { tasks.named("compileTestJava").configure {
// LinkedList doesn't hurt much in tests and has lots of usages // LinkedList doesn't hurt much in tests and has lots of usages
@ -573,7 +579,7 @@ tasks.register('checkForUpdates') {
if (oldResolved != newResolved) { if (oldResolved != newResolved) {
def oldId = oldResolved.id.componentIdentifier def oldId = oldResolved.id.componentIdentifier
def newId = newResolved.id.componentIdentifier def newId = newResolved.id.componentIdentifier
println("${newId.group}:${newId.module} ${oldId.version} -> ${newId.version}") println("libs.${name} = ${newId.group}:${newId.module} ${oldId.version} -> ${newId.version}")
} }
} }
} }

View File

@ -199,7 +199,7 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module> </module>
<module name="JavadocMethod"> <module name="JavadocMethod">
<property name="scope" value="public"/> <property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/> <property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/> <property name="allowMissingReturnTag" value="true"/>
<!-- TOOD(ejona): Too restrictive for tests <!-- TOOD(ejona): Too restrictive for tests

View File

@ -140,7 +140,7 @@ public class DelayedClientCall<ReqT, RespT> extends ClientCall<ReqT, RespT> {
buf.append(String.format(Locale.US, ".%09d", nanos)); buf.append(String.format(Locale.US, ".%09d", nanos));
buf.append("s. "); buf.append("s. ");
/** Cancels the call if deadline exceeded prior to the real call being set. */ /* Cancels the call if deadline exceeded prior to the real call being set. */
class DeadlineExceededRunnable implements Runnable { class DeadlineExceededRunnable implements Runnable {
@Override @Override
public void run() { public void run() {

View File

@ -112,7 +112,7 @@ public class MessageDeframer implements Closeable, Deframer {
* *
* @param listener listener for deframer events. * @param listener listener for deframer events.
* @param decompressor the compression used if a compressed frame is encountered, with * @param decompressor the compression used if a compressed frame is encountered, with
* {@code NONE} meaning unsupported * {@code NONE} meaning unsupported
* @param maxMessageSize the maximum allowed size for received messages. * @param maxMessageSize the maximum allowed size for received messages.
*/ */
public MessageDeframer( public MessageDeframer(

View File

@ -201,7 +201,7 @@ public class ProxyDetectorImplTest {
anyString(), anyString(),
anyString(), anyString(),
AdditionalMatchers.or(anyString(), ArgumentMatchers.<String>any()))) AdditionalMatchers.or(anyString(), ArgumentMatchers.<String>any())))
.thenReturn(auth); .thenReturn(auth);
when(proxySelector.select(any(URI.class))).thenReturn(ImmutableList.of(proxy)); when(proxySelector.select(any(URI.class))).thenReturn(ImmutableList.of(proxy));
ProxiedSocketAddress detected = proxyDetector.proxyFor(destination); ProxiedSocketAddress detected = proxyDetector.proxyFor(destination);

View File

@ -46,16 +46,16 @@ public class TransportFrameUtilTest {
private static final BinaryMarshaller<String> UTF8_STRING_MARSHALLER = private static final BinaryMarshaller<String> UTF8_STRING_MARSHALLER =
new BinaryMarshaller<String>() { new BinaryMarshaller<String>() {
@Override @Override
public byte[] toBytes(String value) { public byte[] toBytes(String value) {
return value.getBytes(UTF_8); return value.getBytes(UTF_8);
} }
@Override @Override
public String parseBytes(byte[] serialized) { public String parseBytes(byte[] serialized) {
return new String(serialized, UTF_8); return new String(serialized, UTF_8);
} }
}; };
private static final Metadata.Key<String> PLAIN_STRING = private static final Metadata.Key<String> PLAIN_STRING =
Metadata.Key.of("plainstring", ASCII_STRING_MARSHALLER); Metadata.Key.of("plainstring", ASCII_STRING_MARSHALLER);

View File

@ -32,7 +32,7 @@ android {
} }
protobuf { protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' } protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
plugins { plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
} }

View File

@ -30,7 +30,7 @@ android {
} }
protobuf { protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' } protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
plugins { plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
} }

View File

@ -30,7 +30,7 @@ android {
} }
protobuf { protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' } protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
plugins { plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
} }

View File

@ -31,7 +31,7 @@ android {
} }
protobuf { protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' } protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
plugins { plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
} }

View File

@ -22,7 +22,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3' def protobufVersion = '3.23.4'
def protocVersion = protobufVersion def protocVersion = protobufVersion
dependencies { dependencies {

View File

@ -24,7 +24,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub // grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub

View File

@ -24,7 +24,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3' def protobufVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.22.3</protoc.version> <protoc.version>3.23.4</protoc.version>
<!-- required for jdk9 --> <!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -24,7 +24,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3' def protobufVersion = '3.23.4'
def protocVersion = protobufVersion def protocVersion = protobufVersion

View File

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.22.3</protobuf.version> <protobuf.version>3.23.4</protobuf.version>
<!-- required for jdk9 --> <!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -25,7 +25,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -22,7 +22,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3' def protobufVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.22.3</protoc.version> <protoc.version>3.23.4</protoc.version>
<!-- required for jdk9 --> <!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -23,7 +23,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3' def protobufVersion = '3.23.4'
def protocVersion = protobufVersion def protocVersion = protobufVersion
dependencies { dependencies {

View File

@ -14,8 +14,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.22.3</protobuf.version> <protobuf.version>3.23.4</protobuf.version>
<protoc.version>3.22.3</protoc.version> <protoc.version>3.23.4</protoc.version>
<!-- required for jdk9 --> <!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -18,7 +18,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -18,7 +18,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -16,7 +16,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}", implementation "io.grpc:grpc-protobuf:${grpcVersion}",

View File

@ -24,7 +24,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.22.3</protoc.version> <protoc.version>3.23.4</protoc.version>
<!-- required for jdk9 --> <!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -23,7 +23,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely // Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process. // updating the version in our release process.
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.22.3' def protocVersion = '3.23.4'
dependencies { dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}" implementation "io.grpc:grpc-protobuf:${grpcVersion}"

View File

@ -13,8 +13,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> <grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.22.3</protobuf.version> <protobuf.version>3.23.4</protobuf.version>
<protoc.version>3.22.3</protoc.version> <protoc.version>3.23.4</protoc.version>
<!-- required for JDK 8 --> <!-- required for JDK 8 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -20,8 +20,6 @@ tasks.named("compileJava").configure {
} }
dependencies { dependencies {
def cloudLoggingVersion = '3.14.5'
annotationProcessor libraries.auto.value annotationProcessor libraries.auto.value
api project(':grpc-api') api project(':grpc-api')
@ -32,7 +30,7 @@ dependencies {
project(':grpc-census'), project(':grpc-census'),
libraries.opencensus.contrib.grpc.metrics libraries.opencensus.contrib.grpc.metrics
// Avoid gradle using project dependencies without configuration: shadow // Avoid gradle using project dependencies without configuration: shadow
implementation ("com.google.cloud:google-cloud-logging:${cloudLoggingVersion}") { implementation (libraries.google.cloud.logging) {
exclude group: 'io.grpc', module: 'grpc-alts' exclude group: 'io.grpc', module: 'grpc-alts'
exclude group: 'io.grpc', module: 'grpc-netty-shaded' exclude group: 'io.grpc', module: 'grpc-netty-shaded'
exclude group: 'io.grpc', module: 'grpc-xds' exclude group: 'io.grpc', module: 'grpc-xds'
@ -57,10 +55,10 @@ dependencies {
project(':grpc-grpclb'), // Align grpc versions project(':grpc-grpclb'), // Align grpc versions
project(':grpc-services'), // Align grpc versions project(':grpc-services'), // Align grpc versions
libraries.animalsniffer.annotations, // Use our newer version libraries.animalsniffer.annotations, // Use our newer version
libraries.auto.value.annotations, // Use our newer version
libraries.guava.jre, // Use our newer version libraries.guava.jre, // Use our newer version
libraries.protobuf.java.util, // Use our newer version libraries.protobuf.java.util, // Use our newer version
libraries.re2j, // Use our newer version libraries.re2j, // Use our newer version
libraries.checker.qual, // Explicit dependency to keep in step with version used by guava
libraries.j2objc.annotations // Explicit dependency to keep in step with version used by guava libraries.j2objc.annotations // Explicit dependency to keep in step with version used by guava
testImplementation testFixtures(project(':grpc-api')), testImplementation testFixtures(project(':grpc-api')),

View File

@ -2,18 +2,28 @@
# Compatibility problem with internal version getting onto 1.5.3. # Compatibility problem with internal version getting onto 1.5.3.
# https://github.com/grpc/grpc-java/pull/9118 # https://github.com/grpc/grpc-java/pull/9118
googleauth = "1.4.0" googleauth = "1.4.0"
guava = "32.0.1-android" # Update notes / 2023-07-19 sergiitk:
# Couldn't update to 32.1.1 because Guava 32.1.0 broke gradle metadata:
# https://github.com/google/guava/releases/tag/v32.1.0
# 32.1.1 partially fixed this, but our build still breaks with:
# Could not resolve com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava.
#
# TODO(any release manager): attempt removing runtimeOnly dependencies when guava upgraded:
# - okhttp: errorprone.annotations
#
# Allowed to be different from guava-jre.
guava = '32.0.1-android'
netty = '4.1.94.Final' netty = '4.1.94.Final'
# Keep the following references of tcnative version in sync whenever it's updated: # Keep the following references of tcnative version in sync whenever it's updated:
# SECURITY.md # SECURITY.md
nettytcnative = '2.0.61.Final' nettytcnative = '2.0.61.Final'
opencensus = "0.31.1" opencensus = "0.31.1"
protobuf = "3.22.3" protobuf = "3.23.4"
[libraries] [libraries]
android-annotations = "com.google.android:annotations:4.1.1.4" android-annotations = "com.google.android:annotations:4.1.1.4"
androidx-annotation = "androidx.annotation:annotation:1.6.0" androidx-annotation = "androidx.annotation:annotation:1.6.0"
androidx-core = "androidx.core:core:1.10.0" androidx-core = "androidx.core:core:1.10.1"
androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.6.1" androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.6.1"
androidx-lifecycle-service = "androidx.lifecycle:lifecycle-service:2.6.1" androidx-lifecycle-service = "androidx.lifecycle:lifecycle-service:2.6.1"
androidx-test-core = "androidx.test:core:1.5.0" androidx-test-core = "androidx.test:core:1.5.0"
@ -21,24 +31,26 @@ androidx-test-ext-junit = "androidx.test.ext:junit:1.1.5"
androidx-test-rules = "androidx.test:rules:1.5.0" androidx-test-rules = "androidx.test:rules:1.5.0"
animalsniffer = "org.codehaus.mojo:animal-sniffer:1.23" animalsniffer = "org.codehaus.mojo:animal-sniffer:1.23"
animalsniffer-annotations = "org.codehaus.mojo:animal-sniffer-annotations:1.23" animalsniffer-annotations = "org.codehaus.mojo:animal-sniffer-annotations:1.23"
auto-value = "com.google.auto.value:auto-value:1.10.1" auto-value = "com.google.auto.value:auto-value:1.10.2"
auto-value-annotations = "com.google.auto.value:auto-value-annotations:1.10.1" auto-value-annotations = "com.google.auto.value:auto-value-annotations:1.10.2"
checker-qual = "org.checkerframework:checker-qual:3.33.0" checkstyle = "com.puppycrawl.tools:checkstyle:10.12.1"
checkstyle = "com.puppycrawl.tools:checkstyle:8.28"
commons-math3 = "org.apache.commons:commons-math3:3.6.1" commons-math3 = "org.apache.commons:commons-math3:3.6.1"
conscrypt = "org.conscrypt:conscrypt-openjdk-uber:2.5.2" conscrypt = "org.conscrypt:conscrypt-openjdk-uber:2.5.2"
cronet-api = "org.chromium.net:cronet-api:108.5359.79" cronet-api = "org.chromium.net:cronet-api:108.5359.79"
cronet-embedded = "org.chromium.net:cronet-embedded:108.5359.79" cronet-embedded = "org.chromium.net:cronet-embedded:108.5359.79"
errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.18.0" errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.20.0"
errorprone-corejava8 = "com.google.errorprone:error_prone_core:2.10.0" errorprone-core = "com.google.errorprone:error_prone_core:2.20.0"
errorprone-core = "com.google.errorprone:error_prone_core:2.18.0" google-api-protos = "com.google.api.grpc:proto-google-common-protos:2.22.0"
google-api-protos = "com.google.api.grpc:proto-google-common-protos:2.17.0"
google-auth-credentials = { module = "com.google.auth:google-auth-library-credentials", version.ref = "googleauth" } google-auth-credentials = { module = "com.google.auth:google-auth-library-credentials", version.ref = "googleauth" }
google-auth-oauth2Http = { module = "com.google.auth:google-auth-library-oauth2-http", version.ref = "googleauth" } google-auth-oauth2Http = { module = "com.google.auth:google-auth-library-oauth2-http", version.ref = "googleauth" }
# Release notes: https://cloud.google.com/logging/docs/release-notes
google-cloud-logging = "com.google.cloud:google-cloud-logging:3.15.5"
gson = "com.google.code.gson:gson:2.10.1" gson = "com.google.code.gson:gson:2.10.1"
guava = { module = "com.google.guava:guava", version.ref = "guava" } guava = { module = "com.google.guava:guava", version.ref = "guava" }
guava-betaChecker = "com.google.guava:guava-beta-checker:1.0" guava-betaChecker = "com.google.guava:guava-beta-checker:1.0"
guava-testlib = { module = "com.google.guava:guava-testlib", version.ref = "guava" } guava-testlib = { module = "com.google.guava:guava-testlib", version.ref = "guava" }
# JRE version is needed for projects where its a transitive dependency, f.e. gcp-observability.
# May be different from the -android version.
guava-jre = "com.google.guava:guava:32.0.1-jre" guava-jre = "com.google.guava:guava:32.0.1-jre"
hdrhistogram = "org.hdrhistogram:HdrHistogram:2.1.12" hdrhistogram = "org.hdrhistogram:HdrHistogram:2.1.12"
javax-annotation = "org.apache.tomcat:annotations-api:6.0.53" javax-annotation = "org.apache.tomcat:annotations-api:6.0.53"
@ -46,8 +58,11 @@ j2objc-annotations = " com.google.j2objc:j2objc-annotations:2.8"
jetty-alpn-agent = "org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.10" jetty-alpn-agent = "org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.10"
jsr305 = "com.google.code.findbugs:jsr305:3.0.2" jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
junit = "junit:junit:4.13.2" junit = "junit:junit:4.13.2"
mockito-android = "org.mockito:mockito-android:3.12.4" # Update notes / 2023-07-19 sergiitk:
mockito-core = "org.mockito:mockito-core:3.12.4" # Couldn't update to 5.4.0, updated to the last in 4.x line. Version 5.x breaks some tests.
# Error log: https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435
mockito-android = "org.mockito:mockito-android:4.11.0"
mockito-core = "org.mockito:mockito-core:4.11.0"
netty-codec-http2 = { module = "io.netty:netty-codec-http2", version.ref = "netty" } netty-codec-http2 = { module = "io.netty:netty-codec-http2", version.ref = "netty" }
netty-handler-proxy = { module = "io.netty:netty-handler-proxy", version.ref = "netty" } netty-handler-proxy = { module = "io.netty:netty-handler-proxy", version.ref = "netty" }
netty-tcnative = { module = "io.netty:netty-tcnative-boringssl-static", version.ref = "nettytcnative" } netty-tcnative = { module = "io.netty:netty-tcnative-boringssl-static", version.ref = "nettytcnative" }
@ -55,7 +70,7 @@ netty-tcnative-classes = { module = "io.netty:netty-tcnative-classes", version.r
netty-transport-epoll = { module = "io.netty:netty-transport-native-epoll", version.ref = "netty" } netty-transport-epoll = { module = "io.netty:netty-transport-native-epoll", version.ref = "netty" }
netty-unix-common = { module = "io.netty:netty-transport-native-unix-common", version.ref = "netty" } netty-unix-common = { module = "io.netty:netty-transport-native-unix-common", version.ref = "netty" }
okhttp = "com.squareup.okhttp:okhttp:2.7.5" okhttp = "com.squareup.okhttp:okhttp:2.7.5"
okio = "com.squareup.okio:okio:1.17.5" okio = "com.squareup.okio:okio:2.10.0"
opencensus-api = { module = "io.opencensus:opencensus-api", version.ref = "opencensus" } opencensus-api = { module = "io.opencensus:opencensus-api", version.ref = "opencensus" }
opencensus-contrib-grpc-metrics = { module = "io.opencensus:opencensus-contrib-grpc-metrics", version.ref = "opencensus" } opencensus-contrib-grpc-metrics = { module = "io.opencensus:opencensus-contrib-grpc-metrics", version.ref = "opencensus" }
opencensus-exporter-stats-stackdriver = { module = "io.opencensus:opencensus-exporter-stats-stackdriver", version.ref = "opencensus" } opencensus-exporter-stats-stackdriver = { module = "io.opencensus:opencensus-exporter-stats-stackdriver", version.ref = "opencensus" }
@ -68,10 +83,13 @@ protobuf-java-util = { module = "com.google.protobuf:protobuf-java-util", versio
protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf" } protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf" }
protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" } protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
re2j = "com.google.re2j:re2j:1.7" re2j = "com.google.re2j:re2j:1.7"
# Compilation failed with 4.10.2 due to native graphics, or something. We don't robolectric = "org.robolectric:robolectric:4.10.3"
# use it, but it seemed the compiler felt it needed the definition
robolectric = "org.robolectric:robolectric:4.9.2"
signature-android = "net.sf.androidscents.signature:android-api-level-19:4.4.2_r4" signature-android = "net.sf.androidscents.signature:android-api-level-19:4.4.2_r4"
signature-java = "org.codehaus.mojo.signature:java18:1.0" signature-java = "org.codehaus.mojo.signature:java18:1.0"
# 1.1+ requires Java 8, but we still use Java 7 with grpc-context truth = "com.google.truth:truth:1.1.5"
truth = "com.google.truth:truth:1.0.1"
# Do not update: Pinned to the last version supporting Java 8.
# See https://checkstyle.sourceforge.io/releasenotes.html#Release_10.1
checkstylejava8 = "com.puppycrawl.tools:checkstyle:9.3"
# See https://github.com/google/error-prone/releases/tag/v2.11.0
errorprone-corejava8 = "com.google.errorprone:error_prone_core:2.10.0"

View File

@ -117,7 +117,7 @@ final class InProcessTransport implements ServerTransport, ConnectionClientTrans
} }
throw new RuntimeException(e); throw new RuntimeException(e);
} }
}; };
@GuardedBy("this") @GuardedBy("this")

View File

@ -1249,7 +1249,7 @@ public abstract class AbstractInteropTest {
} catch (StatusRuntimeException ex) { } catch (StatusRuntimeException ex) {
assertEquals(Status.Code.DEADLINE_EXCEEDED, ex.getStatus().getCode()); assertEquals(Status.Code.DEADLINE_EXCEEDED, ex.getStatus().getCode());
assertThat(ex.getStatus().getDescription()) assertThat(ex.getStatus().getDescription())
.startsWith("ClientCall started after CallOptions deadline was exceeded"); .startsWith("ClientCall started after CallOptions deadline was exceeded");
} }
// CensusStreamTracerModule record final status in the interceptor, thus is guaranteed to be // CensusStreamTracerModule record final status in the interceptor, thus is guaranteed to be
@ -1282,7 +1282,7 @@ public abstract class AbstractInteropTest {
} catch (StatusRuntimeException ex) { } catch (StatusRuntimeException ex) {
assertEquals(Status.Code.DEADLINE_EXCEEDED, ex.getStatus().getCode()); assertEquals(Status.Code.DEADLINE_EXCEEDED, ex.getStatus().getCode());
assertThat(ex.getStatus().getDescription()) assertThat(ex.getStatus().getDescription())
.startsWith("ClientCall started after CallOptions deadline was exceeded"); .startsWith("ClientCall started after CallOptions deadline was exceeded");
} }
if (metricsExpected()) { if (metricsExpected()) {
MetricsRecord clientStartRecord = clientStatsRecorder.pollRecord(5, TimeUnit.SECONDS); MetricsRecord clientStartRecord = clientStatsRecorder.pollRecord(5, TimeUnit.SECONDS);

View File

@ -38,16 +38,16 @@ public class MethodDescriptorBenchmark {
private static final MethodDescriptor.Marshaller<Void> marshaller = private static final MethodDescriptor.Marshaller<Void> marshaller =
new MethodDescriptor.Marshaller<Void>() { new MethodDescriptor.Marshaller<Void>() {
@Override @Override
public InputStream stream(Void value) { public InputStream stream(Void value) {
return new ByteArrayInputStream(new byte[]{}); return new ByteArrayInputStream(new byte[]{});
} }
@Override @Override
public Void parse(InputStream stream) { public Void parse(InputStream stream) {
return null; return null;
} }
}; };
MethodDescriptor<Void, Void> method = MethodDescriptor.<Void, Void>newBuilder() MethodDescriptor<Void, Void> method = MethodDescriptor.<Void, Void>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY) .setType(MethodDescriptor.MethodType.UNARY)

View File

@ -272,9 +272,7 @@ class NettyServer implements InternalServer, InternalWithLogId {
transportListener = listener.transportCreated(transport); transportListener = listener.transportCreated(transport);
} }
/** /* Releases the event loop if the channel is "done", possibly due to the channel closing. */
* Releases the event loop if the channel is "done", possibly due to the channel closing.
*/
final class LoopReleaser implements ChannelFutureListener { final class LoopReleaser implements ChannelFutureListener {
private boolean done; private boolean done;

View File

@ -185,8 +185,8 @@ public class NettyClientHandlerTest extends NettyHandlerTestBase<NettyClientHand
return null; return null;
} }
}) })
.when(streamListener) .when(streamListener)
.messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any()); .messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any());
lifecycleManager = new ClientTransportLifecycleManager(listener); lifecycleManager = new ClientTransportLifecycleManager(listener);
// This mocks the keepalive manager only for there's in which we verify it. For other tests // This mocks the keepalive manager only for there's in which we verify it. For other tests

View File

@ -124,8 +124,8 @@ public class NettyClientStreamTest extends NettyStreamTestBase<NettyClientStream
return null; return null;
} }
}) })
.when(listener) .when(listener)
.messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any()); .messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any());
} }
@Override @Override

View File

@ -179,8 +179,8 @@ public class NettyServerHandlerTest extends NettyHandlerTestBase<NettyServerHand
return null; return null;
} }
}) })
.when(streamListener) .when(streamListener)
.messagesAvailable(any(StreamListener.MessageProducer.class)); .messagesAvailable(any(StreamListener.MessageProducer.class));
} }
@Override @Override

View File

@ -93,8 +93,8 @@ public class NettyServerStreamTest extends NettyStreamTestBase<NettyServerStream
return null; return null;
} }
}) })
.when(serverListener) .when(serverListener)
.messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any()); .messagesAvailable(ArgumentMatchers.<StreamListener.MessageProducer>any());
} }
@Test @Test

View File

@ -15,6 +15,12 @@ dependencies {
libraries.perfmark.api libraries.perfmark.api
// Make okhttp dependencies compile only // Make okhttp dependencies compile only
compileOnly libraries.okhttp compileOnly libraries.okhttp
// Needed because com.google.guava:guava:32.0.1-android requires
// com.google.errorprone:error_prone_annotations version 2.18.0, while we are running newer.
// TODO(any release manager): remove when guava is updated
runtimeOnly libraries.errorprone.annotations
// Tests depend on base class defined by core module. // Tests depend on base class defined by core module.
testImplementation testFixtures(project(':grpc-core')), testImplementation testFixtures(project(':grpc-core')),
testFixtures(project(':grpc-api')), testFixtures(project(':grpc-api')),

View File

@ -11,20 +11,20 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# ) # )
IO_GRPC_GRPC_JAVA_ARTIFACTS = [ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"com.google.android:annotations:4.1.1.4", "com.google.android:annotations:4.1.1.4",
"com.google.api.grpc:proto-google-common-protos:2.17.0", "com.google.api.grpc:proto-google-common-protos:2.22.0",
"com.google.auth:google-auth-library-credentials:1.4.0", "com.google.auth:google-auth-library-credentials:1.4.0",
"com.google.auth:google-auth-library-oauth2-http:1.4.0", "com.google.auth:google-auth-library-oauth2-http:1.4.0",
"com.google.auto.value:auto-value-annotations:1.10.1", "com.google.auto.value:auto-value-annotations:1.10.2",
"com.google.auto.value:auto-value:1.10.1", "com.google.auto.value:auto-value:1.10.2",
"com.google.code.findbugs:jsr305:3.0.2", "com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.10.1", "com.google.code.gson:gson:2.10.1",
"com.google.errorprone:error_prone_annotations:2.18.0", "com.google.errorprone:error_prone_annotations:2.20.0",
"com.google.guava:failureaccess:1.0.1", "com.google.guava:failureaccess:1.0.1",
"com.google.guava:guava:32.0.1-android", "com.google.guava:guava:32.0.1-android",
"com.google.re2j:re2j:1.7", "com.google.re2j:re2j:1.7",
"com.google.truth:truth:1.0.1", "com.google.truth:truth:1.1.5",
"com.squareup.okhttp:okhttp:2.7.5", "com.squareup.okhttp:okhttp:2.7.5",
"com.squareup.okio:okio:1.17.5", "com.squareup.okio:okio:2.10.0",
"io.netty:netty-buffer:4.1.94.Final", "io.netty:netty-buffer:4.1.94.Final",
"io.netty:netty-codec-http2:4.1.94.Final", "io.netty:netty-codec-http2:4.1.94.Final",
"io.netty:netty-codec-http:4.1.94.Final", "io.netty:netty-codec-http:4.1.94.Final",
@ -143,18 +143,18 @@ def com_google_protobuf():
# This statement defines the @com_google_protobuf repo. # This statement defines the @com_google_protobuf repo.
http_archive( http_archive(
name = "com_google_protobuf", name = "com_google_protobuf",
sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0", sha256 = "ac3fd4e97af55405d8bfba43c22d8a7e464a371bb6bc9e706627b745c1022dbf",
strip_prefix = "protobuf-22.3", strip_prefix = "protobuf-23.4",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"], urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.zip"],
) )
def com_google_protobuf_javalite(): def com_google_protobuf_javalite():
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite # java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
http_archive( http_archive(
name = "com_google_protobuf_javalite", name = "com_google_protobuf_javalite",
sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0", sha256 = "ac3fd4e97af55405d8bfba43c22d8a7e464a371bb6bc9e706627b745c1022dbf",
strip_prefix = "protobuf-22.3", strip_prefix = "protobuf-23.4",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"], urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.zip"],
) )
def io_grpc_grpc_proto(): def io_grpc_grpc_proto():

View File

@ -383,8 +383,9 @@ final class ControlPlaneClient {
void start() { void start() {
AggregatedDiscoveryServiceGrpc.AggregatedDiscoveryServiceStub stub = AggregatedDiscoveryServiceGrpc.AggregatedDiscoveryServiceStub stub =
AggregatedDiscoveryServiceGrpc.newStub(channel); AggregatedDiscoveryServiceGrpc.newStub(channel);
StreamObserver<DiscoveryResponse> responseReader =
new ClientResponseObserver<DiscoveryRequest,DiscoveryResponse>() { final class AdsClientResponseObserver
implements ClientResponseObserver<DiscoveryRequest, DiscoveryResponse> {
@Override @Override
public void beforeStart(ClientCallStreamObserver<DiscoveryRequest> requestStream) { public void beforeStart(ClientCallStreamObserver<DiscoveryRequest> requestStream) {
@ -434,8 +435,9 @@ final class ControlPlaneClient {
} }
}); });
} }
}; }
requestWriter = stub.streamAggregatedResources(responseReader);
requestWriter = stub.streamAggregatedResources(new AdsClientResponseObserver());
} }
@Override @Override

View File

@ -59,7 +59,7 @@ public final class CertificateProviderRegistry {
* Deregisters a provider. No-op if the provider is not in the registry. * Deregisters a provider. No-op if the provider is not in the registry.
* *
* @param certificateProviderProvider the provider that was added to the registry via * @param certificateProviderProvider the provider that was added to the registry via
* {@link #register}. * {@link #register}.
*/ */
public synchronized void deregister(CertificateProviderProvider certificateProviderProvider) { public synchronized void deregister(CertificateProviderProvider certificateProviderProvider) {
checkNotNull(certificateProviderProvider, "certificateProviderProvider"); checkNotNull(certificateProviderProvider, "certificateProviderProvider");

View File

@ -49,9 +49,9 @@ public final class CertificateUtils {
private static CertificateFactory factory; private static CertificateFactory factory;
private static final Pattern KEY_PATTERN = Pattern.compile( private static final Pattern KEY_PATTERN = Pattern.compile(
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header "-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" // Header
"([a-z0-9+/=\\r\\n]+)" + // Base64 text + "([a-z0-9+/=\\r\\n]+)" // Base64 text
"-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer + "-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
Pattern.CASE_INSENSITIVE); Pattern.CASE_INSENSITIVE);
private static synchronized void initInstance() throws CertificateException { private static synchronized void initInstance() throws CertificateException {

View File

@ -153,13 +153,13 @@ public class ClusterResolverLoadBalancerTest {
private final NameResolverRegistry nsRegistry = new NameResolverRegistry(); private final NameResolverRegistry nsRegistry = new NameResolverRegistry();
private final PolicySelection roundRobin = new PolicySelection( private final PolicySelection roundRobin = new PolicySelection(
new FakeLoadBalancerProvider("wrr_locality_experimental"), new WrrLocalityConfig( new FakeLoadBalancerProvider("wrr_locality_experimental"), new WrrLocalityConfig(
new PolicySelection(new FakeLoadBalancerProvider("round_robin"), null))); new PolicySelection(new FakeLoadBalancerProvider("round_robin"), null)));
private final PolicySelection ringHash = new PolicySelection( private final PolicySelection ringHash = new PolicySelection(
new FakeLoadBalancerProvider("ring_hash_experimental"), new RingHashConfig(10L, 100L)); new FakeLoadBalancerProvider("ring_hash_experimental"), new RingHashConfig(10L, 100L));
private final PolicySelection leastRequest = new PolicySelection( private final PolicySelection leastRequest = new PolicySelection(
new FakeLoadBalancerProvider("wrr_locality_experimental"), new WrrLocalityConfig( new FakeLoadBalancerProvider("wrr_locality_experimental"), new WrrLocalityConfig(
new PolicySelection(new FakeLoadBalancerProvider("least_request_experimental"), new PolicySelection(new FakeLoadBalancerProvider("least_request_experimental"),
new LeastRequestConfig(3)))); new LeastRequestConfig(3))));
private final List<FakeLoadBalancer> childBalancers = new ArrayList<>(); private final List<FakeLoadBalancer> childBalancers = new ArrayList<>();
private final List<FakeNameResolver> resolvers = new ArrayList<>(); private final List<FakeNameResolver> resolvers = new ArrayList<>();
private final FakeXdsClient xdsClient = new FakeXdsClient(); private final FakeXdsClient xdsClient = new FakeXdsClient();

View File

@ -122,8 +122,8 @@ final class XdsTestControlPlaneService extends
@Override @Override
public StreamObserver<DiscoveryRequest> streamAggregatedResources( public StreamObserver<DiscoveryRequest> streamAggregatedResources(
final StreamObserver<DiscoveryResponse> responseObserver) { final StreamObserver<DiscoveryResponse> responseObserver) {
final StreamObserver<DiscoveryRequest> requestObserver =
new StreamObserver<DiscoveryRequest>() { final class AdsStreamObserver implements StreamObserver<DiscoveryRequest> {
@Override @Override
public void onNext(final DiscoveryRequest value) { public void onNext(final DiscoveryRequest value) {
syncContext.execute(new Runnable() { syncContext.execute(new Runnable() {
@ -176,8 +176,9 @@ final class XdsTestControlPlaneService extends
xdsNonces.get(type).remove(responseObserver); xdsNonces.get(type).remove(responseObserver);
} }
} }
}; }
return requestObserver;
return new AdsStreamObserver();
} }
//must run in syncContext //must run in syncContext

View File

@ -233,7 +233,7 @@ public class SecurityProtocolNegotiatorsTest {
ProtocolNegotiationEvent event = InternalProtocolNegotiationEvent.getDefault(); ProtocolNegotiationEvent event = InternalProtocolNegotiationEvent.getDefault();
Attributes attr = InternalProtocolNegotiationEvent.getAttributes(event) Attributes attr = InternalProtocolNegotiationEvent.getAttributes(event)
.toBuilder().set(ATTR_SERVER_SSL_CONTEXT_PROVIDER_SUPPLIER, .toBuilder().set(ATTR_SERVER_SSL_CONTEXT_PROVIDER_SUPPLIER,
new SslContextProviderSupplier(downstreamTlsContext, tlsContextManager)).build(); new SslContextProviderSupplier(downstreamTlsContext, tlsContextManager)).build();
pipeline.fireUserEventTriggered(InternalProtocolNegotiationEvent.withAttributes(event, attr)); pipeline.fireUserEventTriggered(InternalProtocolNegotiationEvent.withAttributes(event, attr));
channelHandlerCtx = pipeline.context(handlerPickerHandler); channelHandlerCtx = pipeline.context(handlerPickerHandler);
assertThat(channelHandlerCtx).isNull(); assertThat(channelHandlerCtx).isNull();

View File

@ -137,8 +137,8 @@ public class OrcaMetricReportingServerInterceptorTest {
@Test @Test
public void shareCallMetricRecorderInContext() throws IOException { public void shareCallMetricRecorderInContext() throws IOException {
final CallMetricRecorder callMetricRecorder = new CallMetricRecorder(); final CallMetricRecorder callMetricRecorder = new CallMetricRecorder();
ServerStreamTracer.Factory callMetricRecorderSharingStreamTracerFactory = ServerStreamTracer.Factory callMetricRecorderSharingStreamTracerFactory;
new ServerStreamTracer.Factory() { callMetricRecorderSharingStreamTracerFactory = new ServerStreamTracer.Factory() {
@Override @Override
public ServerStreamTracer newServerStreamTracer(String fullMethodName, Metadata headers) { public ServerStreamTracer newServerStreamTracer(String fullMethodName, Metadata headers) {
return new ServerStreamTracer() { return new ServerStreamTracer() {