From 97b575dbc899c795afceb6a20316e41244ab62b3 Mon Sep 17 00:00:00 2001 From: David Gracza <37271364+gr4cza@users.noreply.github.com> Date: Mon, 28 Oct 2024 23:01:14 +0100 Subject: [PATCH] Fix grpc end-of-stream mid-frame error by updating to grpc 1.66.0 based on: https://github.com/camunda-community-hub/spring-zeebe/issues/862 --- dependencies.gradle | 2 +- grpc-server/build.gradle | 1 + .../netflix/conductor/grpc/server/service/GRPCHelper.java | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index e4033cba5..4193d5747 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -28,7 +28,7 @@ ext { revEmbeddedRedis = '0.6' revEurekaClient = '2.0.2' revGroovy = '4.0.9' - revGrpc = '1.57.2' + revGrpc = '1.66.0' revGuava = '33.2.1-jre' revHamcrestAllMatchers = '1.8' revHealth = '1.1.4' diff --git a/grpc-server/build.gradle b/grpc-server/build.gradle index 704930024..45fa516a0 100644 --- a/grpc-server/build.gradle +++ b/grpc-server/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation "io.grpc:grpc-netty:${revGrpc}" implementation "io.grpc:grpc-services:${revGrpc}" implementation "io.grpc:grpc-protobuf:${revGrpc}" + implementation "com.google.guava:guava:${revGuava}" implementation "org.apache.commons:commons-lang3" implementation "com.fasterxml.jackson.core:jackson-databind" implementation "com.fasterxml.jackson.core:jackson-core" diff --git a/grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java b/grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java index 95a910243..de3924f43 100644 --- a/grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java +++ b/grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java @@ -21,18 +21,18 @@ import io.grpc.Metadata; import io.grpc.Status; import io.grpc.StatusException; -import io.grpc.protobuf.lite.ProtoLiteUtils; import io.grpc.stub.StreamObserver; import jakarta.annotation.Nonnull; +import static io.grpc.protobuf.ProtoUtils.metadataMarshaller; + public class GRPCHelper { private final Logger logger; private static final Metadata.Key STATUS_DETAILS_KEY = Metadata.Key.of( - "grpc-status-details-bin", - ProtoLiteUtils.metadataMarshaller(DebugInfo.getDefaultInstance())); + "grpc-status-details-bin", metadataMarshaller(DebugInfo.getDefaultInstance())); public GRPCHelper(Logger log) { this.logger = log;