Skip to content

Commit da45ae5

Browse files
authored
Merge branch 'grpc:v1.67.x' into v1.67.x
2 parents 0ac607d + e821d5e commit da45ae5

File tree

54 files changed

+2222
-780
lines changed

Some content is hidden

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

54 files changed

+2222
-780
lines changed

.github/workflows/gradle-wrapper-validation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
name: "Gradle wrapper validation"
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: gradle/wrapper-validation-action@v1
12+
- uses: actions/checkout@v4
13+
- uses: gradle/actions/wrapper-validation@v4

.github/workflows/lock.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
lock:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: dessant/lock-threads@v4
16+
- uses: dessant/lock-threads@v5
1717
with:
1818
github-token: ${{ github.token }}
1919
issue-inactive-days: 90

.github/workflows/testing.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
fail-fast: false # Should swap to true if we grow a large matrix
2222

2323
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-java@v3
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-java@v4
2626
with:
2727
java-version: ${{ matrix.jre }}
2828
distribution: 'temurin'
2929

3030
- name: Gradle cache
31-
uses: actions/cache@v3
31+
uses: actions/cache@v4
3232
with:
3333
path: |
3434
~/.gradle/caches
@@ -37,7 +37,7 @@ jobs:
3737
restore-keys: |
3838
${{ runner.os }}-gradle-
3939
- name: Maven cache
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: |
4343
~/.m2/repository
@@ -46,7 +46,7 @@ jobs:
4646
restore-keys: |
4747
${{ runner.os }}-maven-
4848
- name: Protobuf cache
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: /tmp/protobuf-cache
5252
key: ${{ runner.os }}-maven-${{ hashFiles('buildscripts/make_dependencies.sh') }}
@@ -55,7 +55,7 @@ jobs:
5555
run: buildscripts/kokoro/unix.sh
5656
- name: Post Failure Upload Test Reports to Artifacts
5757
if: ${{ failure() }}
58-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
5959
with:
6060
name: Test Reports (JRE ${{ matrix.jre }})
6161
path: |
@@ -71,23 +71,25 @@ jobs:
7171
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
7272
run: ./gradlew :grpc-all:coveralls -PskipAndroid=true -x compileJava
7373
- name: Codecov
74-
uses: codecov/codecov-action@v3
74+
uses: codecov/codecov-action@v4
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
7577

7678
bazel:
7779
runs-on: ubuntu-latest
7880
env:
7981
USE_BAZEL_VERSION: 6.0.0
8082

8183
steps:
82-
- uses: actions/checkout@v3
84+
- uses: actions/checkout@v4
8385

8486
- name: Check versions match in MODULE.bazel and repositories.bzl
8587
run: |
8688
diff -u <(sed -n '/GRPC_DEPS_START/,/GRPC_DEPS_END/ {/GRPC_DEPS_/! p}' MODULE.bazel) \
8789
<(sed -n '/GRPC_DEPS_START/,/GRPC_DEPS_END/ {/GRPC_DEPS_/! p}' repositories.bzl)
8890
8991
- name: Bazel cache
90-
uses: actions/cache@v3
92+
uses: actions/cache@v4
9193
with:
9294
path: |
9395
~/.cache/bazel/*/cache

android-interop-testing/build.gradle

-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ dependencies {
6969

7070
implementation project(':grpc-android'),
7171
project(':grpc-core'),
72-
project(':grpc-auth'),
7372
project(':grpc-census'),
7473
project(':grpc-okhttp'),
7574
project(':grpc-protobuf-lite'),
@@ -81,10 +80,6 @@ dependencies {
8180
libraries.androidx.test.rules,
8281
libraries.opencensus.contrib.grpc.metrics
8382

84-
implementation (libraries.google.auth.oauth2Http) {
85-
exclude group: 'org.apache.httpcomponents'
86-
}
87-
8883
implementation (project(':grpc-services')) {
8984
exclude group: 'com.google.protobuf'
9085
exclude group: 'com.google.guava'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2024 The gRPC Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.grpc;
18+
19+
/**
20+
* An internal class. Do not use.
21+
*
22+
* <p>An interface to provide the attributes for address connected by subchannel.
23+
*/
24+
@Internal
25+
public interface InternalSubchannelAddressAttributes {
26+
27+
/**
28+
* Return attributes of the server address connected by sub channel.
29+
*/
30+
public Attributes getConnectedAddressAttributes();
31+
}

api/src/main/java/io/grpc/LoadBalancer.java

+12
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,18 @@ public void updateAddresses(List<EquivalentAddressGroup> addrs) {
14281428
public Object getInternalSubchannel() {
14291429
throw new UnsupportedOperationException();
14301430
}
1431+
1432+
/**
1433+
* (Internal use only) returns attributes of the address subchannel is connected to.
1434+
*
1435+
* <p>Warning: this is INTERNAL API, is not supposed to be used by external users, and may
1436+
* change without notice. If you think you must use it, please file an issue and we can consider
1437+
* removing its "internal" status.
1438+
*/
1439+
@Internal
1440+
public Attributes getConnectedAddressAttributes() {
1441+
throw new UnsupportedOperationException();
1442+
}
14311443
}
14321444

14331445
/**

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

+10
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ protected void handleNotInUse() {
157157

158158
private Status shutdownReason;
159159

160+
private volatile Attributes connectedAddressAttributes;
161+
160162
InternalSubchannel(List<EquivalentAddressGroup> addressGroups, String authority, String userAgent,
161163
BackoffPolicy.Provider backoffPolicyProvider,
162164
ClientTransportFactory transportFactory, ScheduledExecutorService scheduledExecutor,
@@ -525,6 +527,13 @@ public void run() {
525527
return channelStatsFuture;
526528
}
527529

530+
/**
531+
* Return attributes for server address connected by sub channel.
532+
*/
533+
public Attributes getConnectedAddressAttributes() {
534+
return connectedAddressAttributes;
535+
}
536+
528537
ConnectivityState getState() {
529538
return state.getState();
530539
}
@@ -568,6 +577,7 @@ public void run() {
568577
} else if (pendingTransport == transport) {
569578
activeTransport = transport;
570579
pendingTransport = null;
580+
connectedAddressAttributes = addressIndex.getCurrentEagAttributes();
571581
gotoNonErrorState(READY);
572582
}
573583
}

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

+5
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,11 @@ public void updateAddresses(List<EquivalentAddressGroup> addrs) {
20442044
subchannel.updateAddresses(addrs);
20452045
}
20462046

2047+
@Override
2048+
public Attributes getConnectedAddressAttributes() {
2049+
return subchannel.getConnectedAddressAttributes();
2050+
}
2051+
20472052
private List<EquivalentAddressGroup> stripOverrideAuthorityAttributes(
20482053
List<EquivalentAddressGroup> eags) {
20492054
List<EquivalentAddressGroup> eagsWithoutOverrideAttr = new ArrayList<>();

0 commit comments

Comments
 (0)