Skip to content

Commit 3edd086

Browse files
committed
Merge branch 'master' into inconsistencies-error-handling
# Conflicts: # stub/src/main/java/io/grpc/stub/ClientCalls.java
2 parents f8b457a + 3390e5c commit 3edd086

1,081 files changed

Lines changed: 90862 additions & 18031 deletions

File tree

Some content is hidden

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

‎.bazelrc‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
1+
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
2+
3+
common:skip_android --deleted_packages=android,binder

‎.gemini/config.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
have_fun: false
2+
memory_config:
3+
disabled: false
4+
code_review:
5+
disable: false
6+
comment_severity_threshold: MEDIUM
7+
max_review_comments: -1
8+
pull_request_opened:
9+
help: false
10+
summary: false
11+
code_review: false
12+
include_drafts: false
13+
ignore_patterns: []
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: GitHub Actions Branch Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'v1.*'
8+
schedule:
9+
- cron: '54 19 * * SUN' # weekly at a "random" time
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
arm64:
16+
runs-on: ubuntu-24.04-arm
17+
strategy:
18+
matrix:
19+
jre: [17]
20+
fail-fast: false # Should swap to true if we grow a large matrix
21+
22+
steps:
23+
- uses: actions/checkout@v7
24+
- uses: actions/setup-java@v5
25+
with:
26+
java-version: ${{ matrix.jre }}
27+
distribution: 'temurin'
28+
29+
- name: Gradle cache
30+
uses: actions/cache@v6
31+
with:
32+
path: |
33+
~/.gradle/caches
34+
~/.gradle/wrapper
35+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
36+
restore-keys: |
37+
${{ runner.os }}-gradle-
38+
39+
- name: Build
40+
run: ./gradlew -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs='-Xmx1g' -PskipAndroid=true -PskipCodegen=true -PerrorProne=false test
41+

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

Lines changed: 2 additions & 2 deletions
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@v4
13-
- uses: gradle/actions/wrapper-validation@v4
12+
- uses: actions/checkout@v7
13+
- uses: gradle/actions/wrapper-validation@v6

‎.github/workflows/lock.yml‎

Lines changed: 1 addition & 1 deletion
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@v5
16+
- uses: dessant/lock-threads@v6
1717
with:
1818
github-token: ${{ github.token }}
1919
issue-inactive-days: 90

‎.github/workflows/testing.yml‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
jre: [8, 11, 17]
20+
jre: [8, 11, 17, 21]
2121
fail-fast: false # Should swap to true if we grow a large matrix
2222

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

3030
- name: Gradle cache
31-
uses: actions/cache@v4
31+
uses: actions/cache@v6
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@v4
40+
uses: actions/cache@v6
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@v4
49+
uses: actions/cache@v6
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@v4
58+
uses: actions/upload-artifact@v7
5959
with:
6060
name: Test Reports (JRE ${{ matrix.jre }})
6161
path: |
@@ -71,7 +71,7 @@ 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@v4
74+
uses: codecov/codecov-action@v7
7575
with:
7676
token: ${{ secrets.CODECOV_TOKEN }}
7777

@@ -80,28 +80,35 @@ jobs:
8080
strategy:
8181
matrix:
8282
bzlmod: [true, false]
83+
bazel_version: [8.7.0, 9.1.0]
84+
exclude:
85+
- bazel_version: 9.1.0
86+
bzlmod: false
8387
env:
84-
USE_BAZEL_VERSION: 7.0.0
88+
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
8589

8690
steps:
87-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@v7
8892

8993
- name: Check versions match in MODULE.bazel and repositories.bzl
9094
run: |
9195
diff -u <(sed -n '/GRPC_DEPS_START/,/GRPC_DEPS_END/ {/GRPC_DEPS_/! p}' MODULE.bazel) \
9296
<(sed -n '/GRPC_DEPS_START/,/GRPC_DEPS_END/ {/GRPC_DEPS_/! p}' repositories.bzl)
9397
9498
- name: Bazel cache
95-
uses: actions/cache@v4
99+
uses: actions/cache@v6
96100
with:
97101
path: |
98102
~/.cache/bazel/*/cache
99103
~/.cache/bazelisk/downloads
100104
key: ${{ runner.os }}-bazel-${{ env.USE_BAZEL_VERSION }}-${{ hashFiles('WORKSPACE', 'repositories.bzl') }}
101105

102106
- name: Run bazel build
103-
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
107+
run: bazelisk build //... --config=skip_android --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }}
108+
109+
- name: Run bazel test
110+
run: bazelisk test //... --config=skip_android --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }}
104111

105112
- name: Run example bazel build
106-
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
113+
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }}
107114
working-directory: ./examples

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ MODULE.bazel.lock
3131
.gitignore
3232
bin
3333

34+
# VsCode
35+
.vscode
36+
3437
# OS X
3538
.DS_Store
3639

‎BUILD.bazel‎

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

15+
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
16+
load("@rules_java//java:defs.bzl", "java_library", "java_plugin")
1517
load("@rules_jvm_external//:defs.bzl", "artifact")
1618
load(":java_grpc_library.bzl", "java_grpc_library")
1719

@@ -33,7 +35,6 @@ java_library(
3335
"//api",
3436
"//protobuf",
3537
"//stub",
36-
"//stub:javax_annotation",
3738
"@com_google_protobuf//:protobuf_java",
3839
artifact("com.google.code.findbugs:jsr305"),
3940
artifact("com.google.guava:guava"),
@@ -47,7 +48,6 @@ java_library(
4748
"//api",
4849
"//protobuf-lite",
4950
"//stub",
50-
"//stub:javax_annotation",
5151
artifact("com.google.code.findbugs:jsr305"),
5252
artifact("com.google.guava:guava"),
5353
],
@@ -67,6 +67,5 @@ java_library(
6767
visibility = ["//:__subpackages__"],
6868
exports = [
6969
artifact("com.google.auto.value:auto-value-annotations"),
70-
artifact("org.apache.tomcat:annotations-api"), # @Generated for Java 9+
7170
],
7271
)

‎COMPILING.md‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ This section is only necessary if you are making changes to the code
4444
generation. Most users only need to use `skipCodegen=true` as discussed above.
4545

4646
### Build Protobuf
47-
The codegen plugin is C++ code and requires protobuf 21.7 or later.
47+
The codegen plugin is C++ code and requires protobuf 22.5 or later.
4848

4949
For Linux, Mac and MinGW:
5050
```
51-
$ PROTOBUF_VERSION=21.7
51+
$ PROTOBUF_VERSION=22.5
5252
$ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-all-$PROTOBUF_VERSION.tar.gz
5353
$ tar xzf protobuf-all-$PROTOBUF_VERSION.tar.gz
5454
$ cd protobuf-$PROTOBUF_VERSION
@@ -150,3 +150,26 @@ $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
150150

151151
# Add 'export ANDROID_HOME=$HOME/Android/Sdk' to your .bashrc or equivalent
152152
```
153+
154+
Building with Bazel
155+
===================
156+
157+
grpc-java can also be built using [Bazel](https://bazel.build/). We support
158+
the two most recent major versions of Bazel.
159+
[Install bazelisk](https://github.com/bazelbuild/bazelisk#installation)
160+
to ensure you're always building using the latest supported version, then try:
161+
162+
```
163+
$ bazelisk build //...
164+
```
165+
166+
Some parts of grpc-java depend on Android. Bazel can build these parts too but,
167+
for size, licensing and maintenance reasons, it requires a locally installed
168+
Android SDK. If you don't have the SDK and/or don't care about Android, use the
169+
`skip_android` configuration to skip building the Android parts:
170+
171+
```sh
172+
$ bazelisk build //... --config=skip_android
173+
```
174+
175+
You cannot run the tests from Bazel at this time.

‎MAINTAINERS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ for general contribution guidelines.
1111
- [ejona86](https://github.com/ejona86), Google LLC
1212
- [jdcormie](https://github.com/jdcormie), Google LLC
1313
- [kannanjgithub](https://github.com/kannanjgithub), Google LLC
14-
- [larry-safran](https://github.com/larry-safran), Google LLC
15-
- [markb74](https://github.com/markb74), Google LLC
1614
- [ran-su](https://github.com/ran-su), Google LLC
1715
- [sergiitk](https://github.com/sergiitk), Google LLC
1816
- [temawi](https://github.com/temawi), Google LLC
@@ -26,7 +24,9 @@ for general contribution guidelines.
2624
- [ericgribkoff](https://github.com/ericgribkoff)
2725
- [jiangtaoli2016](https://github.com/jiangtaoli2016)
2826
- [jtattermusch](https://github.com/jtattermusch)
27+
- [larry-safran](https://github.com/larry-safran)
2928
- [louiscryan](https://github.com/louiscryan)
29+
- [markb74](https://github.com/markb74)
3030
- [nicolasnoble](https://github.com/nicolasnoble)
3131
- [nmittler](https://github.com/nmittler)
3232
- [sanjaypujare](https://github.com/sanjaypujare)

0 commit comments

Comments
 (0)