Skip to content

Commit

Permalink
bump: grpc-core, grpc-interop-testing, ... 1.70.0 (was 1.63.2) (#2011)
Browse files Browse the repository at this point in the history
Additional changes required
* Skip module-info in assemblies (present in multiple dependencies)
* Changes to interop tests because of upstream changes.
---------

Co-authored-by: Johan Andrén <[email protected]>
  • Loading branch information
scala-steward and johanandren authored Jan 28, 2025
1 parent 8222347 commit 6cc9309
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 120 deletions.
2 changes: 1 addition & 1 deletion benchmark-java/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ run / javaOptions ++= List("-Xms1g", "-Xmx1g", "-XX:+PrintGCDetails", "-XX:+Prin
// generate both client and server (default) in Java
akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Java)

val grpcVersion = "1.63.2" // checked synced by VersionSyncCheckPlugin
val grpcVersion = "1.70.0" // checked synced by VersionSyncCheckPlugin

val runtimeProject = ProjectRef(file("../"), "akka-grpc-runtime")

Expand Down
8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ ThisBuild / dynverSeparator := "-"
// append -SNAPSHOT to version when isSnapshot
ThisBuild / dynverSonatypeSnapshots := true

// skip Java 9 module info in all assembled artifacts
ThisBuild / assemblyMergeStrategy := {
case x if x.endsWith("module-info.class") => MergeStrategy.discard
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}

val akkaGrpcCodegenId = "akka-grpc-codegen"
lazy val codegen = Project(id = akkaGrpcCodegenId, base = file("codegen"))
.enablePlugins(SbtTwirl, BuildInfoPlugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AkkaGrpcPluginExtension {

static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12"

static final String GRPC_VERSION = "1.63.2" // checked synced by VersionSyncCheckPlugin
static final String GRPC_VERSION = "1.70.0" // checked synced by VersionSyncCheckPlugin

static final String PLUGIN_CODE = 'com.lightbend.akka.grpc.gradle'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

/**
* This class has all the methods of the grpc-java AbstractInteropTest, but none of the implementations,
* so it can implemented either by calling AbstractInteropTest or with an Akka gRPC implementation.
* so it can implement either by calling AbstractInteropTest or with an Akka gRPC implementation.
* https://github.com/grpc/grpc-java/blob/master/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java
*
* Test requirements documentation: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md
*/
Expand All @@ -22,8 +23,6 @@ public interface ClientTester {

void emptyUnary() throws Exception;

void cacheableUnary();

void largeUnary() throws Exception;

void clientCompressedUnary(boolean probe) throws Exception;
Expand All @@ -42,16 +41,6 @@ public interface ClientTester {

void emptyStream() throws Exception;

void computeEngineCreds(String serviceAccount, String oauthScope) throws Exception;

void serviceAccountCreds(String jsonKey, InputStream credentialsStream, String authScope) throws Exception;

void jwtTokenCreds(InputStream serviceAccountJson) throws Exception;

void oauth2AuthToken(String jsonKey, InputStream credentialsStream, String authScope) throws Exception;

void perRpcCreds(String jsonKey, InputStream credentialsStream, String oauthScope) throws Exception;

void customMetadata() throws Exception;

void statusCodeAndMessage() throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

package io.grpc.testing.integration2;

import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.testing.integration.AbstractInteropTest;

import java.io.InputStream;

/**
* Implementation of ClientTester that forwards all calls to the
* grpc-java AbstractInteropTest.
Expand Down Expand Up @@ -41,11 +38,6 @@ public void emptyUnary() throws Exception {
tester.emptyUnary();
}

@Override
public void cacheableUnary() {
tester.cacheableUnary();
}

@Override
public void largeUnary() throws Exception {
tester.largeUnary();
Expand Down Expand Up @@ -91,31 +83,6 @@ public void emptyStream() throws Exception {
tester.emptyStream();
}

@Override
public void computeEngineCreds(String serviceAccount, String oauthScope) throws Exception {
tester.computeEngineCreds(serviceAccount, oauthScope);
}

@Override
public void serviceAccountCreds(String jsonKey, InputStream credentialsStream, String authScope) throws Exception {
tester.serviceAccountCreds(jsonKey, credentialsStream, authScope);
}

@Override
public void jwtTokenCreds(InputStream serviceAccountJson) throws Exception {
tester.jwtTokenCreds(serviceAccountJson);
}

@Override
public void oauth2AuthToken(String jsonKey, InputStream credentialsStream, String authScope) throws Exception {
tester.oauth2AuthToken(jsonKey, credentialsStream, authScope);
}

@Override
public void perRpcCreds(String jsonKey, InputStream credentialsStream, String oauthScope) throws Exception {
tester.perRpcCreds(jsonKey, credentialsStream, oauthScope);
}

@Override
public void customMetadata() throws Exception {
tester.customMetadata();
Expand Down Expand Up @@ -151,7 +118,7 @@ public void timeoutOnSleepingServer() throws Exception {
tester.timeoutOnSleepingServer();
}

private class UnderlyingTester extends AbstractInteropTest {
public final class UnderlyingTester extends AbstractInteropTest {
@Override
protected ManagedChannelBuilder<?> createChannelBuilder() {
return ChannelBuilder.create(settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ private void runTest(TestCases testCase, Settings settings) throws Exception {
clientTester.emptyUnary();
break;

case CACHEABLE_UNARY: {
clientTester.cacheableUnary();
break;
}

case LARGE_UNARY:
clientTester.largeUnary();
break;
Expand Down Expand Up @@ -146,37 +141,6 @@ private void runTest(TestCases testCase, Settings settings) throws Exception {
clientTester.emptyStream();
break;

case COMPUTE_ENGINE_CREDS:
clientTester.computeEngineCreds(settings.getDefaultServiceAccount(), settings.getOauthScope());
break;

case SERVICE_ACCOUNT_CREDS: {
String jsonKey = Files.asCharSource(new File(settings.getServiceAccountKeyFile()), UTF_8).read();
FileInputStream credentialsStream = new FileInputStream(new File(settings.getServiceAccountKeyFile()));
clientTester.serviceAccountCreds(jsonKey, credentialsStream, settings.getOauthScope());
break;
}

case JWT_TOKEN_CREDS: {
FileInputStream credentialsStream = new FileInputStream(new File(settings.getServiceAccountKeyFile()));
clientTester.jwtTokenCreds(credentialsStream);
break;
}

case OAUTH2_AUTH_TOKEN: {
String jsonKey = Files.asCharSource(new File(settings.getServiceAccountKeyFile()), UTF_8).read();
FileInputStream credentialsStream = new FileInputStream(new File(settings.getServiceAccountKeyFile()));
clientTester.oauth2AuthToken(jsonKey, credentialsStream, settings.getOauthScope());
break;
}

case PER_RPC_CREDS: {
String jsonKey = Files.asCharSource(new File(settings.getServiceAccountKeyFile()), UTF_8).read();
FileInputStream credentialsStream = new FileInputStream(new File(settings.getServiceAccountKeyFile()));
clientTester.perRpcCreds(jsonKey, credentialsStream, settings.getOauthScope());
break;
}

case CUSTOM_METADATA: {
clientTester.customMetadata();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.junit.Assert;
import scala.concurrent.ExecutionContext;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -86,11 +85,6 @@ public void emptyUnary() throws Exception {
);
}

@Override
public void cacheableUnary() {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void largeUnary() throws Exception {
final Messages.SimpleRequest request = Messages.SimpleRequest.newBuilder()
Expand Down Expand Up @@ -248,31 +242,6 @@ public void emptyStream() throws Exception {
assertEquals(0, response.size());
}

@Override
public void computeEngineCreds(String serviceAccount, String oauthScope) throws Exception {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void serviceAccountCreds(String jsonKey, InputStream credentialsStream, String authScope) throws Exception {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void jwtTokenCreds(InputStream serviceAccountJson) throws Exception {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void oauth2AuthToken(String jsonKey, InputStream credentialsStream, String authScope) throws Exception {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void perRpcCreds(String jsonKey, InputStream credentialsStream, String oauthScope) throws Exception {
throw new UnsupportedOperationException("Not implemented!");
}

@Override
public void customMetadata() throws Exception {
// unary call
Expand Down
2 changes: 1 addition & 1 deletion plugin-tester-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<maven-exec-plugin.version>3.0.0</maven-exec-plugin.version>
<akka.http.cors.version>1.1.0</akka.http.cors.version>
<akka.version>2.10.0</akka.version>
<grpc.version>1.63.2</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<grpc.version>1.70.0</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<project.encoding>UTF-8</project.encoding>
<build-helper-maven-plugin>3.3.0</build-helper-maven-plugin>
<protobuf-java.version>3.22.2</protobuf-java.version>
Expand Down
2 changes: 1 addition & 1 deletion plugin-tester-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<maven.compiler.release>11</maven.compiler.release>
<akka.version>2.10.0</akka.version>
<akka.http.cors.version>0.4.2</akka.http.cors.version>
<grpc.version>1.63.2</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<grpc.version>1.70.0</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<project.encoding>UTF-8</project.encoding>
<proto-google-common.version>2.22.0</proto-google-common.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object Dependencies {
val akkaHttp = "10.7.0"
val akkaHttpBinary = VersionNumber(akkaHttp).numbers match { case Seq(major, minor, _*) => s"$major.$minor" }

val grpc = "1.63.2" // checked synced by VersionSyncCheckPlugin
val grpc = "1.70.0" // checked synced by VersionSyncCheckPlugin

// Even referenced explicitly in the sbt-plugin's sbt-tests
// If changing this, remember to update protoc plugin version to align in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolvers += "Akka library repository".at("https://repo.akka.io/maven")

organization := "com.lightbend.akka.grpc"

val grpcVersion = "1.63.2" // checked synced by VersionSyncCheckPlugin
val grpcVersion = "1.70.0" // checked synced by VersionSyncCheckPlugin

libraryDependencies ++= Seq(
"io.grpc" % "grpc-interop-testing" % grpcVersion % "protobuf-src",
Expand Down

0 comments on commit 6cc9309

Please sign in to comment.