Skip to content

Commit 20fa07d

Browse files
committed
Merge remote-tracking branch 'origin/authorityverifyokhttp' into authorityverifyokhttp
2 parents aa59965 + ece5487 commit 20fa07d

File tree

75 files changed

+1704
-596
lines changed

Some content is hidden

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

75 files changed

+1704
-596
lines changed

.github/workflows/testing.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,16 @@ jobs:
7777

7878
bazel:
7979
runs-on: ubuntu-latest
80+
strategy:
81+
matrix:
82+
include:
83+
# Test with and without bzlmod. Bazel 6 doesn't support bzlmod, so use Bazel 7 instead
84+
- bazel: 6.0.0
85+
bzlmod: false
86+
- bazel: 7.0.0
87+
bzlmod: true
8088
env:
81-
USE_BAZEL_VERSION: 6.0.0
89+
USE_BAZEL_VERSION: ${{ matrix.bazel }}
8290

8391
steps:
8492
- uses: actions/checkout@v4
@@ -97,19 +105,8 @@ jobs:
97105
key: ${{ runner.os }}-bazel-${{ env.USE_BAZEL_VERSION }}-${{ hashFiles('WORKSPACE', 'repositories.bzl') }}
98106

99107
- name: Run bazel build
100-
run: bazelisk build //... --enable_bzlmod=false
108+
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
101109

102110
- name: Run example bazel build
103-
run: bazelisk build //... --enable_bzlmod=false
104-
working-directory: ./examples
105-
106-
- name: Run bazel build (bzlmod)
107-
env:
108-
USE_BAZEL_VERSION: 7.0.0
109-
run: bazelisk build //... --enable_bzlmod=true
110-
111-
- name: Run example bazel build (bzlmod)
112-
env:
113-
USE_BAZEL_VERSION: 7.0.0
114-
run: bazelisk build //... --enable_bzlmod=true
111+
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
115112
working-directory: ./examples

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module(
22
name = "grpc-java",
33
compatibility_level = 0,
44
repo_name = "io_grpc_grpc_java",
5-
version = "1.69.0-SNAPSHOT", # CURRENT_GRPC_VERSION
5+
version = "1.70.0-SNAPSHOT", # CURRENT_GRPC_VERSION
66
)
77

88
# GRPC_DEPS_START

api/src/testFixtures/java/io/grpc/testing/DeadlineSubject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void of(Deadline expected) {
6767
if (Math.abs(actualNanos - expectedNanos) > deltaNanos) {
6868
failWithoutActual(
6969
fact("expected", expectedNanos / NANOSECONDS_IN_A_SECOND),
70-
fact("but was", expectedNanos / NANOSECONDS_IN_A_SECOND),
70+
fact("but was", actualNanos / NANOSECONDS_IN_A_SECOND),
7171
fact("outside tolerance in seconds", deltaNanos / NANOSECONDS_IN_A_SECOND));
7272
}
7373
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ subprojects {
2121
apply plugin: "net.ltgt.errorprone"
2222

2323
group = "io.grpc"
24-
version = "1.69.0-SNAPSHOT" // CURRENT_GRPC_VERSION
24+
version = "1.70.0-SNAPSHOT" // CURRENT_GRPC_VERSION
2525

2626
repositories {
2727
maven { // The google mirror is less flaky than mavenCentral()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Config file for internal CI
2+
3+
# Location of the continuous shell script in repository.
4+
build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh"
5+
timeout_mins: 120
6+
7+
action {
8+
define_artifacts {
9+
regex: "artifacts/**/*sponge_log.xml"
10+
regex: "artifacts/**/*.log"
11+
strip_prefix: "artifacts"
12+
}
13+
}
14+
env_vars {
15+
key: "PSM_TEST_SUITE"
16+
value: "fallback"
17+
}

compiler/src/test/golden/TestDeprecatedService.java.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
88
* </pre>
99
*/
1010
@javax.annotation.Generated(
11-
value = "by gRPC proto compiler (version 1.69.0-SNAPSHOT)",
11+
value = "by gRPC proto compiler (version 1.70.0-SNAPSHOT)",
1212
comments = "Source: grpc/testing/compiler/test.proto")
1313
@io.grpc.stub.annotations.GrpcGenerated
1414
@java.lang.Deprecated

compiler/src/test/golden/TestService.java.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
88
* </pre>
99
*/
1010
@javax.annotation.Generated(
11-
value = "by gRPC proto compiler (version 1.69.0-SNAPSHOT)",
11+
value = "by gRPC proto compiler (version 1.70.0-SNAPSHOT)",
1212
comments = "Source: grpc/testing/compiler/test.proto")
1313
@io.grpc.stub.annotations.GrpcGenerated
1414
public final class TestServiceGrpc {

core/src/main/java/io/grpc/internal/DnsNameResolver.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,17 @@ public class DnsNameResolver extends NameResolver {
134134
private final String host;
135135
private final int port;
136136

137-
/** Executor that will be used if an Executor is not provide via {@link NameResolver.Args}. */
138-
private final Resource<Executor> executorResource;
137+
private final ObjectPool<Executor> executorPool;
139138
private final long cacheTtlNanos;
140139
private final SynchronizationContext syncContext;
140+
private final ServiceConfigParser serviceConfigParser;
141141

142142
// Following fields must be accessed from syncContext
143143
private final Stopwatch stopwatch;
144144
protected boolean resolved;
145145
private boolean shutdown;
146146
private Executor executor;
147147

148-
/** True if using an executor resource that should be released after use. */
149-
private final boolean usingExecutorResource;
150-
private final ServiceConfigParser serviceConfigParser;
151-
152148
private boolean resolving;
153149

154150
// The field must be accessed from syncContext, although the methods on an Listener2 can be called
@@ -165,7 +161,7 @@ protected DnsNameResolver(
165161
checkNotNull(args, "args");
166162
// TODO: if a DNS server is provided as nsAuthority, use it.
167163
// https://www.captechconsulting.com/blogs/accessing-the-dusty-corners-of-dns-with-java
168-
this.executorResource = executorResource;
164+
169165
// Must prepend a "//" to the name when constructing a URI, otherwise it will be treated as an
170166
// opaque URI, thus the authority and host of the resulted URI would be null.
171167
URI nameUri = URI.create("//" + checkNotNull(name, "name"));
@@ -179,11 +175,15 @@ protected DnsNameResolver(
179175
port = nameUri.getPort();
180176
}
181177
this.proxyDetector = checkNotNull(args.getProxyDetector(), "proxyDetector");
178+
Executor offloadExecutor = args.getOffloadExecutor();
179+
if (offloadExecutor != null) {
180+
this.executorPool = new FixedObjectPool<>(offloadExecutor);
181+
} else {
182+
this.executorPool = SharedResourcePool.forResource(executorResource);
183+
}
182184
this.cacheTtlNanos = getNetworkAddressCacheTtlNanos(isAndroid);
183185
this.stopwatch = checkNotNull(stopwatch, "stopwatch");
184186
this.syncContext = checkNotNull(args.getSynchronizationContext(), "syncContext");
185-
this.executor = args.getOffloadExecutor();
186-
this.usingExecutorResource = executor == null;
187187
this.serviceConfigParser = checkNotNull(args.getServiceConfigParser(), "serviceConfigParser");
188188
}
189189

@@ -200,9 +200,7 @@ protected String getHost() {
200200
@Override
201201
public void start(Listener2 listener) {
202202
Preconditions.checkState(this.listener == null, "already started");
203-
if (usingExecutorResource) {
204-
executor = SharedResourceHolder.get(executorResource);
205-
}
203+
executor = executorPool.getObject();
206204
this.listener = checkNotNull(listener, "listener");
207205
resolve();
208206
}
@@ -413,8 +411,8 @@ public void shutdown() {
413411
return;
414412
}
415413
shutdown = true;
416-
if (executor != null && usingExecutorResource) {
417-
executor = SharedResourceHolder.release(executorResource, executor);
414+
if (executor != null) {
415+
executor = executorPool.returnObject(executor);
418416
}
419417
}
420418

core/src/main/java/io/grpc/internal/GrpcUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public byte[] parseAsciiString(byte[] serialized) {
219219

220220
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
221221

222-
public static final String IMPLEMENTATION_VERSION = "1.69.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
222+
public static final String IMPLEMENTATION_VERSION = "1.70.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
223223

224224
/**
225225
* The default timeout in nanos for a keepalive ping request.

examples/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240326-1c8d509c5")
2-
bazel_dep(name = "grpc-java", repo_name = "io_grpc_grpc_java", version = "1.69.0-SNAPSHOT") # CURRENT_GRPC_VERSION
2+
bazel_dep(name = "grpc-java", repo_name = "io_grpc_grpc_java", version = "1.70.0-SNAPSHOT") # CURRENT_GRPC_VERSION
33
bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58")
44
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1")
55
bazel_dep(name = "rules_jvm_external", version = "6.0")

0 commit comments

Comments
 (0)