An interface to provide the attributes for address connected by subchannel.
+ */
+@Internal
+public interface InternalSubchannelAddressAttributes {
+
+ /**
+ * Return attributes of the server address connected by sub channel.
+ */
+ public Attributes getConnectedAddressAttributes();
+}
diff --git a/api/src/main/java/io/grpc/LoadBalancer.java b/api/src/main/java/io/grpc/LoadBalancer.java
index 15106a5ffc6..0fbce5fa5be 100644
--- a/api/src/main/java/io/grpc/LoadBalancer.java
+++ b/api/src/main/java/io/grpc/LoadBalancer.java
@@ -1428,6 +1428,18 @@ public void updateAddresses(List Warning: this is INTERNAL API, is not supposed to be used by external users, and may
+ * change without notice. If you think you must use it, please file an issue and we can consider
+ * removing its "internal" status.
+ */
+ @Internal
+ public Attributes getConnectedAddressAttributes() {
+ throw new UnsupportedOperationException();
+ }
}
/**
diff --git a/auth/BUILD.bazel b/auth/BUILD.bazel
index 095fae5af8b..a19562fa7f7 100644
--- a/auth/BUILD.bazel
+++ b/auth/BUILD.bazel
@@ -11,6 +11,5 @@ java_library(
artifact("com.google.auth:google-auth-library-credentials"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/build.gradle b/build.gradle
index 74cfacb800a..740f534e136 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,7 +21,7 @@ subprojects {
apply plugin: "net.ltgt.errorprone"
group = "io.grpc"
- version = "1.67.0-SNAPSHOT" // CURRENT_GRPC_VERSION
+ version = "1.68.0-SNAPSHOT" // CURRENT_GRPC_VERSION
repositories {
maven { // The google mirror is less flaky than mavenCentral()
diff --git a/buildscripts/grpc-java-artifacts/Dockerfile b/buildscripts/grpc-java-artifacts/Dockerfile
index 97c152780a3..736babe9d8e 100644
--- a/buildscripts/grpc-java-artifacts/Dockerfile
+++ b/buildscripts/grpc-java-artifacts/Dockerfile
@@ -28,6 +28,6 @@ RUN mkdir -p "$ANDROID_HOME/cmdline-tools" && \
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses
# Install Maven
-RUN curl -Ls https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz | \
+RUN curl -Ls https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | \
tar xz -C /var/local
-ENV PATH /var/local/apache-maven-3.3.9/bin:$PATH
+ENV PATH /var/local/apache-maven-3.8.8/bin:$PATH
diff --git a/buildscripts/kokoro/macos.sh b/buildscripts/kokoro/macos.sh
index 97259231ee8..018d15dd2f9 100755
--- a/buildscripts/kokoro/macos.sh
+++ b/buildscripts/kokoro/macos.sh
@@ -15,4 +15,7 @@ export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2"
. "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh
trap spongify_logs EXIT
+export -n JAVA_HOME
+export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${PATH}"
+
"$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh
diff --git a/buildscripts/kokoro/unix.sh b/buildscripts/kokoro/unix.sh
index 9b1a4054c7e..1b88b56ab40 100755
--- a/buildscripts/kokoro/unix.sh
+++ b/buildscripts/kokoro/unix.sh
@@ -23,11 +23,6 @@ readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
# cd to the root dir of grpc-java
cd $(dirname $0)/../..
-# TODO(zpencer): always make sure we are using Oracle jdk8
-if [[ -f /usr/libexec/java_home ]]; then
- JAVA_HOME=$(/usr/libexec/java_home -v"1.8.0")
-fi
-
# ARCH is x86_64 unless otherwise specified.
ARCH="${ARCH:-x86_64}"
diff --git a/compiler/src/test/golden/TestDeprecatedService.java.txt b/compiler/src/test/golden/TestDeprecatedService.java.txt
index 75e9e0b47e0..04a7f2406b3 100644
--- a/compiler/src/test/golden/TestDeprecatedService.java.txt
+++ b/compiler/src/test/golden/TestDeprecatedService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.67.0-SNAPSHOT)",
+ value = "by gRPC proto compiler (version 1.68.0-SNAPSHOT)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
@java.lang.Deprecated
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 3852b6ee547..d69abad7cbb 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.67.0-SNAPSHOT)",
+ value = "by gRPC proto compiler (version 1.68.0-SNAPSHOT)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TestServiceGrpc {
diff --git a/core/BUILD.bazel b/core/BUILD.bazel
index a1d3d19e828..35c20628d0b 100644
--- a/core/BUILD.bazel
+++ b/core/BUILD.bazel
@@ -30,7 +30,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("io.perfmark:perfmark-api"),
artifact("org.codehaus.mojo:animal-sniffer-annotations"),
],
diff --git a/core/src/main/java/io/grpc/internal/AbstractClientStream.java b/core/src/main/java/io/grpc/internal/AbstractClientStream.java
index 51c31993f46..bb346657d53 100644
--- a/core/src/main/java/io/grpc/internal/AbstractClientStream.java
+++ b/core/src/main/java/io/grpc/internal/AbstractClientStream.java
@@ -92,8 +92,8 @@ void writeFrame(
private final TransportTracer transportTracer;
private final Framer framer;
- private boolean shouldBeCountedForInUse;
- private boolean useGet;
+ private final boolean shouldBeCountedForInUse;
+ private final boolean useGet;
private Metadata headers;
/**
* Whether cancel() has been called. This is not strictly necessary, but removes the delay between
diff --git a/core/src/main/java/io/grpc/internal/GrpcUtil.java b/core/src/main/java/io/grpc/internal/GrpcUtil.java
index 593bdbce13f..a1fe34c2edc 100644
--- a/core/src/main/java/io/grpc/internal/GrpcUtil.java
+++ b/core/src/main/java/io/grpc/internal/GrpcUtil.java
@@ -219,7 +219,7 @@ public byte[] parseAsciiString(byte[] serialized) {
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
- public static final String IMPLEMENTATION_VERSION = "1.67.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
+ public static final String IMPLEMENTATION_VERSION = "1.68.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
/**
* The default timeout in nanos for a keepalive ping request.
diff --git a/core/src/main/java/io/grpc/internal/InternalSubchannel.java b/core/src/main/java/io/grpc/internal/InternalSubchannel.java
index a986cb2deff..70e42e2f5f1 100644
--- a/core/src/main/java/io/grpc/internal/InternalSubchannel.java
+++ b/core/src/main/java/io/grpc/internal/InternalSubchannel.java
@@ -157,6 +157,8 @@ protected void handleNotInUse() {
private Status shutdownReason;
+ private volatile Attributes connectedAddressAttributes;
+
InternalSubchannel(List> addresses = addrStore.get(uri.getPath().substring(1));
+ try {
+ List