Skip to content

Commit

Permalink
Merge branch 'master' into blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-safran authored Aug 31, 2023
2 parents 2104a0f + 36e0af6 commit 6c06c90
Show file tree
Hide file tree
Showing 303 changed files with 6,762 additions and 1,783 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
USE_BAZEL_VERSION: 5.0.0

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Bazel cache
uses: actions/cache@v3
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gRPC-Java - An RPC library and framework
Supported Platforms
-------------------

gRPC-Java supports Java 8 and later. Android minSdkVersion 19 (KitKat) and
gRPC-Java supports Java 8 and later. Android minSdkVersion 21 (Lollipop) and
later are supported with [Java 8 language desugaring][android-java-8].

TLS usage on Android typically requires Play Services Dynamic Security Provider.
Expand All @@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
basics](https://grpc.io/docs/languages/java/basics).

The [examples](https://github.com/grpc/grpc-java/tree/v1.56.0/examples) and the
[Android example](https://github.com/grpc/grpc-java/tree/v1.56.0/examples/android)
The [examples](https://github.com/grpc/grpc-java/tree/v1.57.2/examples) and the
[Android example](https://github.com/grpc/grpc-java/tree/v1.57.2/examples/android)
are standalone projects that showcase the usage of gRPC.

Download
Expand All @@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.56.0</version>
<version>1.57.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.56.0</version>
<version>1.57.2</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.56.0</version>
<version>1.57.2</version>
</dependency>
<dependency> <!-- necessary for Java 9+ -->
<groupId>org.apache.tomcat</groupId>
Expand All @@ -79,18 +79,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:

Or for Gradle with non-Android, add to your dependencies:
```gradle
runtimeOnly 'io.grpc:grpc-netty-shaded:1.56.0'
implementation 'io.grpc:grpc-protobuf:1.56.0'
implementation 'io.grpc:grpc-stub:1.56.0'
runtimeOnly 'io.grpc:grpc-netty-shaded:1.57.2'
implementation 'io.grpc:grpc-protobuf:1.57.2'
implementation 'io.grpc:grpc-stub:1.57.2'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```

For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
`grpc-protobuf-lite` instead of `grpc-protobuf`:
```gradle
implementation 'io.grpc:grpc-okhttp:1.56.0'
implementation 'io.grpc:grpc-protobuf-lite:1.56.0'
implementation 'io.grpc:grpc-stub:1.56.0'
implementation 'io.grpc:grpc-okhttp:1.57.2'
implementation 'io.grpc:grpc-protobuf-lite:1.57.2'
implementation 'io.grpc:grpc-stub:1.57.2'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```

Expand All @@ -99,7 +99,7 @@ For [Bazel](https://bazel.build), you can either
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).

[the JARs]:
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.56.0
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.57.2

Development snapshots are available in [Sonatypes's snapshot
repository](https://oss.sonatype.org/content/repositories/snapshots/).
Expand Down Expand Up @@ -131,7 +131,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact>
<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.57.2:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
Expand All @@ -152,7 +152,7 @@ For non-Android protobuf-based codegen integrated with the Gradle build system,
you can use [protobuf-gradle-plugin][]:
```gradle
plugins {
id 'com.google.protobuf' version '0.9.1'
id 'com.google.protobuf' version '0.9.4'
}
protobuf {
Expand All @@ -161,7 +161,7 @@ protobuf {
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
artifact = 'io.grpc:protoc-gen-grpc-java:1.57.2'
}
}
generateProtoTasks {
Expand All @@ -185,7 +185,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:

```gradle
plugins {
id 'com.google.protobuf' version '0.9.1'
id 'com.google.protobuf' version '0.9.4'
}
protobuf {
Expand All @@ -194,7 +194,7 @@ protobuf {
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
artifact = 'io.grpc:protoc-gen-grpc-java:1.57.2'
}
}
generateProtoTasks {
Expand Down
138 changes: 67 additions & 71 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ would be used to create all `v1.7` tags (e.g. `v1.7.0`, `v1.7.1`).
$(git log --pretty=format:%H --grep "^Start $MAJOR.$((MINOR+1)).0 development cycle$" upstream/master)^
$ git push upstream v$MAJOR.$MINOR.x
```
5. Continue with Google-internal steps at go/grpc/java/releasing, but stop
5. Continue with Google-internal steps at go/grpc-java/releasing, but stop
before `Auto releasing using kokoro`.
6. Create a milestone for the next release.
7. Move items out of the release milestone that didn't make the cut. Issues that
Expand All @@ -91,7 +91,8 @@ Tagging the Release
either be deferred or resolved and the fix backported. Verify there are no
[TODO:release blocker][] nor [TODO:backport][] issues (open or closed), or
that they are tracking an issue for a different branch.
2. Ensure that Google-internal steps completed at go/grpc/java/releasing#before-tagging-a-release.
2. Ensure that the Google-internal steps
at go/grpc-java/releasing#before-tagging-a-release are completed.
3. For vMajor.Minor.x branch, change `README.md` to refer to the next release
version. _Also_ update the version numbers for protoc if the protobuf library
version was updated since the last release.
Expand Down Expand Up @@ -141,39 +142,70 @@ Tagging the Release
```
7. Close the release milestone.

Build Artifacts
---------------
8. Trigger build as described in "Auto releasing using kokoro" at
go/grpc-java/releasing.

It runs three jobs on Kokoro, one on each platform. See their scripts:
`linux_artifacts.sh`, `windows.bat`, and `macos.sh`. The mvn-artifacts/
outputs of each script is combined into a single folder and then processed
by `upload_artifacts.sh`, which signs the files and uploads to Sonatype.

9. Once all of the artifacts have been pushed to the staging repository, the
repository should have been closed by `upload_artifacts.sh`. Closing triggers
several sanity checks on the repository. If this completes successfully, the
repository can then be `released`, which will begin the process of pushing
the new artifacts to Maven Central (the staging repository will be destroyed
in the process). You can see the complete process for releasing to Maven
Central on the [OSSRH site](https://central.sonatype.org/pages/releasing-the-deployment.html).

10. We have containers for each release to detect compatibility regressions with
old releases. Generate one for the new release by following the [GCR image
generation instructions][gcr-image]. Summary:
```bash
# If you haven't previously configured docker:
gcloud auth configure-docker

# In main grpc repo, add the new version to matrix
${EDITOR:-nano -w} tools/interop_matrix/client_matrix.py
tools/interop_matrix/create_matrix_images.py --git_checkout --release=v$MAJOR.$MINOR.$PATCH \
--upload_images --language java
docker pull gcr.io/grpc-testing/grpc_interop_java:v$MAJOR.$MINOR.$PATCH
docker_image=gcr.io/grpc-testing/grpc_interop_java:v$MAJOR.$MINOR.$PATCH \
tools/interop_matrix/testcases/java__master

# Commit the changes
git commit --all -m "[interop] Add grpc-java $MAJOR.$MINOR.$PATCH to client_matrix.py"

# Create a PR with the `release notes: no` label and run ad-hoc test against your PR
```
[gcr-image]: https://github.com/grpc/grpc/blob/master/tools/interop_matrix/README.md#step-by-step-instructions-for-adding-a-gcr-image-for-a-new-release-for-compatibility-test

11. Update gh-pages with the new Javadoc. Generally the file is on repo1
15 minutes after publishing:

```bash
git checkout gh-pages
git pull --ff-only upstream gh-pages
rm -r javadoc/
wget -O grpc-all-javadoc.jar "https://repo1.maven.org/maven2/io/grpc/grpc-all/$MAJOR.$MINOR.$PATCH/grpc-all-$MAJOR.$MINOR.$PATCH-javadoc.jar"
unzip -d javadoc grpc-all-javadoc.jar
patch -p1 < ga.patch
rm grpc-all-javadoc.jar
rm -r javadoc/META-INF/
git add -A javadoc
git commit -m "Javadoc for $MAJOR.$MINOR.$PATCH"
```

Push gh-pages to the main repository and verify the current version is
[live on grpc.io](https://grpc.io/grpc-java/javadoc/).

12. Add [Release Notes](https://github.com/grpc/grpc-java/releases) for the new tag.
*Make sure that any backports are reflected in the release notes.*

Trigger build as described in "Auto releasing using kokoro" at
go/grpc/java/releasing.

It runs three jobs on Kokoro, one on each platform. See their scripts:
`linux_artifacts.sh`, `windows.bat`, and `unix.sh` (called directly for OS X;
called within the Docker environment on Linux). The mvn-artifacts/ outputs of
each script is combined into a single folder and then processed by
`upload_artifacts.sh`, which signs the files and uploads to Sonatype.

Releasing on Maven Central
--------------------------

Once all of the artifacts have been pushed to the staging repository, the
repository should have been closed by `upload_artifacts.sh`. Closing triggers
several sanity checks on the repository. If this completes successfully, the
repository can then be `released`, which will begin the process of pushing the
new artifacts to Maven Central (the staging repository will be destroyed in the
process). You can see the complete process for releasing to Maven Central on the
[OSSRH site](https://central.sonatype.org/pages/releasing-the-deployment.html).

Build interop container image
-----------------------------

We have containers for each release to detect compatibility regressions with old
releases. Generate one for the new release by following the
[GCR image generation instructions](https://github.com/grpc/grpc/blob/master/tools/interop_matrix/README.md#step-by-step-instructions-for-adding-a-gcr-image-for-a-new-release-for-compatibility-test).

Update README.md
----------------
After waiting ~1 day and verifying that the release appears on [Maven
After waiting ~1 day and verifying that the release is indexed on [Maven
Central](https://search.maven.org/search?q=g:io.grpc), cherry-pick the commit
that updated the README into the master branch.

Expand All @@ -183,14 +215,6 @@ $ git cherry-pick v$MAJOR.$MINOR.$PATCH^
$ git push --set-upstream origin bump-readme
```

NOTE: If you add to your ~/.gitconfig the following, you don't need the
`--set-upstream`

```text
[push]
autoSetupRemote = true
```

Create a PR and go through the review process

Update version referenced by tutorials
Expand All @@ -202,35 +226,7 @@ of the grpc.io repository.

Notify the Community
--------------------
Finally, document and publicize the release.

1. Add [Release Notes](https://github.com/grpc/grpc-java/releases) for the new tag.
The description should include any major fixes or features since the last release.
You may choose to add links to bugs, PRs, or commits if appropriate.
2. Post a release announcement to [grpc-io](https://groups.google.com/forum/#!forum/grpc-io)
(`[email protected]`). The title should be something that clearly identifies
the release (e.g.`GRPC-Java <tag> Released`).
- Note that there may have been backports to the release branch since you
generated the release notes. Please verify that any backports are reflected
in the release notes before sending them out.

Update Hosted Javadoc
---------------------

Now we need to update gh-pages with the new Javadoc:

```bash
git checkout gh-pages
git pull --ff-only upstream gh-pages
rm -r javadoc/
wget -O grpc-all-javadoc.jar "http://search.maven.org/remotecontent?filepath=io/grpc/grpc-all/$MAJOR.$MINOR.$PATCH/grpc-all-$MAJOR.$MINOR.$PATCH-javadoc.jar"
unzip -d javadoc grpc-all-javadoc.jar
patch -p1 < ga.patch
rm grpc-all-javadoc.jar
rm -r javadoc/META-INF/
git add -A javadoc
git commit -m "Javadoc for $MAJOR.$MINOR.$PATCH"
```

Push gh-pages to the main repository and verify the current version is [live
on grpc.io](https://grpc.io/grpc-java/javadoc/).
Post a release announcement to [grpc-io](https://groups.google.com/forum/#!forum/grpc-io)
(`[email protected]`) with the title `gRPC-Java v$MAJOR.$MINOR.$PATCH
Released`. The email content should link to the GitHub release notes and include
a copy of them.
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ grpc-netty version | netty-handler version | netty-tcnative-boringssl-static ver
1.48.x-1.49.x | 4.1.77.Final | 2.0.53.Final
1.50.x-1.53.x | 4.1.79.Final | 2.0.54.Final
1.54.x-1.55.x | 4.1.87.Final | 2.0.56.Final
1.56.x- | 4.1.87.Final | 2.0.61.Final
1.56.x | 4.1.87.Final | 2.0.61.Final
1.57.x- | 4.1.93.Final | 2.0.61.Final

_(grpc-netty-shaded avoids issues with keeping these versions in sync.)_

Expand Down
7 changes: 3 additions & 4 deletions all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ description = "gRPC: All"
def subprojects = [
project(':grpc-api'),
project(':grpc-auth'),
project(':grpc-context'),
project(':grpc-core'),
project(':grpc-grpclb'),
project(':grpc-netty'),
Expand All @@ -23,6 +22,7 @@ def subprojects = [
project(':grpc-servlet-jakarta'),
project(':grpc-stub'),
project(':grpc-testing'),
project(':grpc-util'),
project(':grpc-xds'),
]

Expand Down Expand Up @@ -53,11 +53,10 @@ tasks.named("javadoc").configure {
}

tasks.named("jacocoTestReport").configure {
dependsOn(subprojects.jacocoTestReport.dependsOn)
dependsOn(project(':grpc-interop-testing').jacocoTestReport.dependsOn)
mustRunAfter(subprojects.jacocoTestReport.mustRunAfter)
mustRunAfter(project(':grpc-interop-testing').jacocoTestReport.mustRunAfter)
executionData.from files(subprojects.jacocoTestReport.executionData)
.plus(project(':grpc-interop-testing').jacocoTestReport.executionData)
.filter { f -> f.exists() }
reports {
xml.required = true
html.required = true
Expand Down
3 changes: 3 additions & 0 deletions alts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ tasks.named("javadoc").configure {
tasks.named("jar").configure {
// Must use a different archiveClassifier to avoid conflicting with shadowJar
archiveClassifier = 'original'
manifest {
attributes('Automatic-Module-Name': 'io.grpc.alts')
}
}

// We want to use grpc-netty-shaded instead of grpc-netty. But we also want our
Expand Down
3 changes: 0 additions & 3 deletions alts/src/main/java/io/grpc/alts/FailingCallCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,4 @@ public void applyRequestMetadata(
CallCredentials.MetadataApplier applier) {
applier.fail(status);
}

@Override
public void thisUsesUnstableApi() {}
}
Loading

0 comments on commit 6c06c90

Please sign in to comment.