Skip to content

Commit 9ea0ab3

Browse files
Merge pull request #8 from grpc/master
2 parents 2d9dcf3 + 8dbd47c commit 9ea0ab3

File tree

140 files changed

+1655
-820
lines changed

Some content is hidden

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

140 files changed

+1655
-820
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
4444
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
4545
basics](https://grpc.io/docs/languages/java/basics).
4646

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

5151
Download
@@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
5656
<dependency>
5757
<groupId>io.grpc</groupId>
5858
<artifactId>grpc-netty-shaded</artifactId>
59-
<version>1.54.1</version>
59+
<version>1.56.0</version>
6060
<scope>runtime</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>io.grpc</groupId>
6464
<artifactId>grpc-protobuf</artifactId>
65-
<version>1.54.1</version>
65+
<version>1.56.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>io.grpc</groupId>
6969
<artifactId>grpc-stub</artifactId>
70-
<version>1.54.1</version>
70+
<version>1.56.0</version>
7171
</dependency>
7272
<dependency> <!-- necessary for Java 9+ -->
7373
<groupId>org.apache.tomcat</groupId>
@@ -79,18 +79,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
7979

8080
Or for Gradle with non-Android, add to your dependencies:
8181
```gradle
82-
runtimeOnly 'io.grpc:grpc-netty-shaded:1.54.1'
83-
implementation 'io.grpc:grpc-protobuf:1.54.1'
84-
implementation 'io.grpc:grpc-stub:1.54.1'
82+
runtimeOnly 'io.grpc:grpc-netty-shaded:1.56.0'
83+
implementation 'io.grpc:grpc-protobuf:1.56.0'
84+
implementation 'io.grpc:grpc-stub:1.56.0'
8585
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
8686
```
8787

8888
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
8989
`grpc-protobuf-lite` instead of `grpc-protobuf`:
9090
```gradle
91-
implementation 'io.grpc:grpc-okhttp:1.54.1'
92-
implementation 'io.grpc:grpc-protobuf-lite:1.54.1'
93-
implementation 'io.grpc:grpc-stub:1.54.1'
91+
implementation 'io.grpc:grpc-okhttp:1.56.0'
92+
implementation 'io.grpc:grpc-protobuf-lite:1.56.0'
93+
implementation 'io.grpc:grpc-stub:1.56.0'
9494
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
9595
```
9696

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

101101
[the JARs]:
102-
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.54.1
102+
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.56.0
103103

104104
Development snapshots are available in [Sonatypes's snapshot
105105
repository](https://oss.sonatype.org/content/repositories/snapshots/).
@@ -129,9 +129,9 @@ For protobuf-based codegen integrated with the Maven build system, you can use
129129
<artifactId>protobuf-maven-plugin</artifactId>
130130
<version>0.6.1</version>
131131
<configuration>
132-
<protocArtifact>com.google.protobuf:protoc:3.21.7:exe:${os.detected.classifier}</protocArtifact>
132+
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact>
133133
<pluginId>grpc-java</pluginId>
134-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.54.1:exe:${os.detected.classifier}</pluginArtifact>
134+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.0:exe:${os.detected.classifier}</pluginArtifact>
135135
</configuration>
136136
<executions>
137137
<execution>
@@ -157,11 +157,11 @@ plugins {
157157
158158
protobuf {
159159
protoc {
160-
artifact = "com.google.protobuf:protoc:3.21.7"
160+
artifact = "com.google.protobuf:protoc:3.22.3"
161161
}
162162
plugins {
163163
grpc {
164-
artifact = 'io.grpc:protoc-gen-grpc-java:1.54.1'
164+
artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
165165
}
166166
}
167167
generateProtoTasks {
@@ -190,11 +190,11 @@ plugins {
190190
191191
protobuf {
192192
protoc {
193-
artifact = "com.google.protobuf:protoc:3.21.7"
193+
artifact = "com.google.protobuf:protoc:3.22.3"
194194
}
195195
plugins {
196196
grpc {
197-
artifact = 'io.grpc:protoc-gen-grpc-java:1.54.1'
197+
artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
198198
}
199199
}
200200
generateProtoTasks {

RELEASING.md

Lines changed: 64 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -141,39 +141,70 @@ Tagging the Release
141141
```
142142
7. Close the release milestone.
143143

144-
Build Artifacts
145-
---------------
144+
8. Trigger build as described in "Auto releasing using kokoro" at
145+
go/grpc/java/releasing.
146+
147+
It runs three jobs on Kokoro, one on each platform. See their scripts:
148+
`linux_artifacts.sh`, `windows.bat`, and `macos.sh`. The mvn-artifacts/
149+
outputs of each script is combined into a single folder and then processed
150+
by `upload_artifacts.sh`, which signs the files and uploads to Sonatype.
151+
152+
9. Once all of the artifacts have been pushed to the staging repository, the
153+
repository should have been closed by `upload_artifacts.sh`. Closing triggers
154+
several sanity checks on the repository. If this completes successfully, the
155+
repository can then be `released`, which will begin the process of pushing
156+
the new artifacts to Maven Central (the staging repository will be destroyed
157+
in the process). You can see the complete process for releasing to Maven
158+
Central on the [OSSRH site](https://central.sonatype.org/pages/releasing-the-deployment.html).
159+
160+
10. We have containers for each release to detect compatibility regressions with
161+
old releases. Generate one for the new release by following the [GCR image
162+
generation instructions][gcr-image]. Summary:
163+
```bash
164+
# If you haven't previously configured docker:
165+
gcloud auth configure-docker
166+
167+
# In main grpc repo, add the new version to matrix
168+
${EDITOR:-nano -w} tools/interop_matrix/client_matrix.py
169+
tools/interop_matrix/create_matrix_images.py --git_checkout --release=v$MAJOR.$MINOR.$PATCH \
170+
--upload_images --language java
171+
docker pull gcr.io/grpc-testing/grpc_interop_java:v$MAJOR.$MINOR.$PATCH
172+
docker_image=gcr.io/grpc-testing/grpc_interop_java:v$MAJOR.$MINOR.$PATCH \
173+
tools/interop_matrix/testcases/java__master
174+
175+
# Commit the changes
176+
git commit --all -m "Add grpc-java $MAJOR.$MINOR.$PATCH to client_matrix.py"
177+
178+
# Create a PR and run ad-hoc test against your PR
179+
```
180+
[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
181+
182+
11. Update gh-pages with the new Javadoc. Generally the file is on repo1
183+
15 minutes after publishing:
184+
185+
```bash
186+
git checkout gh-pages
187+
git pull --ff-only upstream gh-pages
188+
rm -r javadoc/
189+
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"
190+
unzip -d javadoc grpc-all-javadoc.jar
191+
patch -p1 < ga.patch
192+
rm grpc-all-javadoc.jar
193+
rm -r javadoc/META-INF/
194+
git add -A javadoc
195+
git commit -m "Javadoc for $MAJOR.$MINOR.$PATCH"
196+
```
197+
198+
Push gh-pages to the main repository and verify the current version is
199+
[live on grpc.io](https://grpc.io/grpc-java/javadoc/).
200+
201+
12. Add [Release Notes](https://github.com/grpc/grpc-java/releases) for the new tag.
202+
*Make sure that any backports are reflected in the release notes.*
146203

147-
Trigger build as described in "Auto releasing using kokoro" at
148-
go/grpc/java/releasing.
149-
150-
It runs three jobs on Kokoro, one on each platform. See their scripts:
151-
`linux_artifacts.sh`, `windows.bat`, and `unix.sh` (called directly for OS X;
152-
called within the Docker environment on Linux). The mvn-artifacts/ outputs of
153-
each script is combined into a single folder and then processed by
154-
`upload_artifacts.sh`, which signs the files and uploads to Sonatype.
155-
156-
Releasing on Maven Central
157-
--------------------------
158-
159-
Once all of the artifacts have been pushed to the staging repository, the
160-
repository should have been closed by `upload_artifacts.sh`. Closing triggers
161-
several sanity checks on the repository. If this completes successfully, the
162-
repository can then be `released`, which will begin the process of pushing the
163-
new artifacts to Maven Central (the staging repository will be destroyed in the
164-
process). You can see the complete process for releasing to Maven Central on the
165-
[OSSRH site](https://central.sonatype.org/pages/releasing-the-deployment.html).
166-
167-
Build interop container image
168-
-----------------------------
169-
170-
We have containers for each release to detect compatibility regressions with old
171-
releases. Generate one for the new release by following the
172-
[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).
173204

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

@@ -183,14 +214,6 @@ $ git cherry-pick v$MAJOR.$MINOR.$PATCH^
183214
$ git push --set-upstream origin bump-readme
184215
```
185216

186-
NOTE: If you add to your ~/.gitconfig the following, you don't need the
187-
`--set-upstream`
188-
189-
```text
190-
[push]
191-
autoSetupRemote = true
192-
```
193-
194217
Create a PR and go through the review process
195218

196219
Update version referenced by tutorials
@@ -202,35 +225,7 @@ of the grpc.io repository.
202225

203226
Notify the Community
204227
--------------------
205-
Finally, document and publicize the release.
206-
207-
1. Add [Release Notes](https://github.com/grpc/grpc-java/releases) for the new tag.
208-
The description should include any major fixes or features since the last release.
209-
You may choose to add links to bugs, PRs, or commits if appropriate.
210-
2. Post a release announcement to [grpc-io](https://groups.google.com/forum/#!forum/grpc-io)
211-
(`[email protected]`). The title should be something that clearly identifies
212-
the release (e.g.`GRPC-Java <tag> Released`).
213-
- Note that there may have been backports to the release branch since you
214-
generated the release notes. Please verify that any backports are reflected
215-
in the release notes before sending them out.
216-
217-
Update Hosted Javadoc
218-
---------------------
219-
220-
Now we need to update gh-pages with the new Javadoc:
221-
222-
```bash
223-
git checkout gh-pages
224-
git pull --ff-only upstream gh-pages
225-
rm -r javadoc/
226-
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"
227-
unzip -d javadoc grpc-all-javadoc.jar
228-
patch -p1 < ga.patch
229-
rm grpc-all-javadoc.jar
230-
rm -r javadoc/META-INF/
231-
git add -A javadoc
232-
git commit -m "Javadoc for $MAJOR.$MINOR.$PATCH"
233-
```
234-
235-
Push gh-pages to the main repository and verify the current version is [live
236-
on grpc.io](https://grpc.io/grpc-java/javadoc/).
228+
Post a release announcement to [grpc-io](https://groups.google.com/forum/#!forum/grpc-io)
229+
(`[email protected]`) with the title `gRPC-Java v$MAJOR.$MINOR.$PATCH
230+
Released`. The email content should link to the GitHub release notes and include
231+
a copy of them.

SECURITY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ grpc-netty version | netty-handler version | netty-tcnative-boringssl-static ver
394394
1.44.x-1.47.x | 4.1.72.Final | 2.0.46.Final
395395
1.48.x-1.49.x | 4.1.77.Final | 2.0.53.Final
396396
1.50.x-1.53.x | 4.1.79.Final | 2.0.54.Final
397-
1.54.x- | 4.1.87.Final | 2.0.56.Final
397+
1.54.x-1.55.x | 4.1.87.Final | 2.0.56.Final
398+
1.56.x | 4.1.87.Final | 2.0.61.Final
399+
1.57.x- | 4.1.94.Final | 2.0.61.Final
398400

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

alts/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ dependencies {
3333
libraries.mockito.core,
3434
libraries.truth
3535

36-
testImplementation (libraries.guava.testlib) {
37-
exclude group: 'junit', module: 'junit'
38-
}
36+
testImplementation libraries.guava.testlib
3937
testRuntimeOnly libraries.netty.tcnative,
4038
libraries.netty.tcnative.classes
4139
testRuntimeOnly (libraries.netty.transport.epoll) {

alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public final class HandshakerServiceGrpc {
1212

1313
private HandshakerServiceGrpc() {}
1414

15-
public static final String SERVICE_NAME = "grpc.gcp.HandshakerService";
15+
public static final java.lang.String SERVICE_NAME = "grpc.gcp.HandshakerService";
1616

1717
// Static method descriptors that strictly reflect the proto.
1818
private static volatile io.grpc.MethodDescriptor<io.grpc.alts.internal.HandshakerReq,
@@ -261,9 +261,9 @@ private static final class HandshakerServiceFileDescriptorSupplier
261261
private static final class HandshakerServiceMethodDescriptorSupplier
262262
extends HandshakerServiceBaseDescriptorSupplier
263263
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
264-
private final String methodName;
264+
private final java.lang.String methodName;
265265

266-
HandshakerServiceMethodDescriptorSupplier(String methodName) {
266+
HandshakerServiceMethodDescriptorSupplier(java.lang.String methodName) {
267267
this.methodName = methodName;
268268
}
269269

android-interop-testing/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ import net.ltgt.gradle.errorprone.CheckSeverity
112112

113113
tasks.withType(JavaCompile).configureEach {
114114
options.compilerArgs += [
115-
"-Xlint:-cast"
115+
"-Xlint:-cast",
116+
"-Xlint:-deprecation", // https://github.com/grpc/grpc-java/issues/10298
116117
]
117118
appendToProperty(it.options.errorprone.excludedPaths, ".*/R.java", "|")
118119
appendToProperty(

android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
2626
import com.google.android.gms.common.GooglePlayServicesRepairableException;
2727
import com.google.android.gms.security.ProviderInstaller;
28-
import com.google.common.util.concurrent.SettableFuture;
29-
import io.grpc.android.integrationtest.InteropTask.Listener;
3028
import java.io.InputStream;
29+
import java.util.concurrent.ExecutionException;
30+
import java.util.concurrent.ExecutorService;
31+
import java.util.concurrent.Executors;
3132
import java.util.concurrent.TimeUnit;
3233
import org.junit.Before;
3334
import org.junit.Test;
@@ -44,6 +45,7 @@ public class InteropInstrumentationTest {
4445
private String serverHostOverride;
4546
private boolean useTestCa;
4647
private String testCase;
48+
private ExecutorService executor = Executors.newSingleThreadExecutor();
4749

4850
@Before
4951
public void setUp() throws Exception {
@@ -101,26 +103,21 @@ public void interopTests() throws Exception {
101103
}
102104

103105
private void runTest(String testCase) throws Exception {
104-
final SettableFuture<String> resultFuture = SettableFuture.create();
105-
InteropTask.Listener listener =
106-
new Listener() {
107-
@Override
108-
public void onComplete(String result) {
109-
resultFuture.set(result);
110-
}
111-
};
112106
InputStream testCa;
113107
if (useTestCa) {
114108
testCa = ApplicationProvider.getApplicationContext().getResources().openRawResource(R.raw.ca);
115109
} else {
116110
testCa = null;
117111
}
118-
new InteropTask(
119-
listener,
120-
TesterOkHttpChannelBuilder.build(host, port, serverHostOverride, useTls, testCa),
121-
testCase)
122-
.execute();
123-
String result = resultFuture.get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
124-
assertEquals(testCase + " failed", InteropTask.SUCCESS_MESSAGE, result);
112+
113+
String result = null;
114+
try {
115+
result = executor.submit(new TestCallable(
116+
TesterOkHttpChannelBuilder.build(host, port, serverHostOverride, useTls, testCa),
117+
testCase)).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
118+
assertEquals(testCase + " failed", TestCallable.SUCCESS_MESSAGE, result);
119+
} catch (ExecutionException | InterruptedException e) {
120+
result = e.getMessage();
121+
}
125122
}
126123
}

0 commit comments

Comments
 (0)