From 2f214286a1f7f3a9ed7aacb05cb62bfc183d5d9f Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Wed, 13 Nov 2024 14:56:35 -0800 Subject: [PATCH 1/5] Upgrade dependency check plugin to 11.1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6bbd3a48449..3d8498ab908 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ 3.3.0 4.4.2.2 1.11.0 - 10.0.4 + 11.1.0 3.0.0 1.1 2.3 From 8f05c142c879707963db83c87343437f20926c39 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Wed, 13 Nov 2024 14:56:52 -0800 Subject: [PATCH 2/5] Upgrade Netty to 4.1.115 --- dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 6c502500ade..b57e39d12fa 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -128,7 +128,7 @@ 8.2.0 5.12.0.Final 5.12.0 - 4.1.108.Final + 4.1.115.Final 0.0.19.Final 3.46.1 21.15.0.0 From 7714d0b61e8d91fbb99d7de18cb0ba0db31e3a63 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Wed, 13 Nov 2024 16:48:41 -0800 Subject: [PATCH 3/5] Upgrade grpc-java to 1.65.1. Move from protobuf-lite to protobuf --- dependencies/pom.xml | 2 +- grpc/core/pom.xml | 4 ++++ .../java/io/helidon/grpc/core/MarshallerSupplier.java | 10 +++++----- grpc/core/src/main/java/module-info.java | 1 - .../grpc/server/src/main/java/module-info.java | 1 - 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dependencies/pom.xml b/dependencies/pom.xml index b57e39d12fa..38d0a26bccf 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -61,7 +61,7 @@ 22.1 22.0 2.9.0 - 1.60.0 + 1.65.1 32.0.1-jre 2.1.212 1.3 diff --git a/grpc/core/pom.xml b/grpc/core/pom.xml index 8024f7e86ab..6ea50e3e7fd 100644 --- a/grpc/core/pom.xml +++ b/grpc/core/pom.xml @@ -57,6 +57,10 @@ io.grpc grpc-inprocess + + io.grpc + grpc-util + io.grpc grpc-netty diff --git a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java index 47e14278f76..4f48fa532ea 100644 --- a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java +++ b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java @@ -16,9 +16,9 @@ package io.helidon.grpc.core; -import com.google.protobuf.MessageLite; +import com.google.protobuf.Message; import io.grpc.MethodDescriptor; -import io.grpc.protobuf.lite.ProtoLiteUtils; +import io.grpc.protobuf.ProtoUtils; import jakarta.inject.Named; /** @@ -68,7 +68,7 @@ class DefaultMarshallerSupplier @Override public MethodDescriptor.Marshaller get(Class clazz) { - if (MessageLite.class.isAssignableFrom(clazz)) { + if (Message.class.isAssignableFrom(clazz)) { return proto.get(clazz); } String msg = String.format( @@ -91,9 +91,9 @@ class ProtoMarshallerSupplier public MethodDescriptor.Marshaller get(Class clazz) { try { java.lang.reflect.Method getDefaultInstance = clazz.getDeclaredMethod("getDefaultInstance"); - MessageLite instance = (MessageLite) getDefaultInstance.invoke(clazz); + Message instance = (Message) getDefaultInstance.invoke(clazz); - return (MethodDescriptor.Marshaller) ProtoLiteUtils.marshaller(instance); + return (MethodDescriptor.Marshaller) ProtoUtils.marshaller(instance); } catch (Exception e) { String msg = String.format( "Attempting to use class %s, which is not a valid Protocol buffer message, with a default marshaller", diff --git a/grpc/core/src/main/java/module-info.java b/grpc/core/src/main/java/module-info.java index 93ee54203bd..8c68f292753 100644 --- a/grpc/core/src/main/java/module-info.java +++ b/grpc/core/src/main/java/module-info.java @@ -33,7 +33,6 @@ requires io.grpc.netty; requires transitive io.grpc.protobuf; - requires io.grpc.protobuf.lite; requires transitive io.grpc.stub; requires transitive io.grpc; requires io.netty.handler; diff --git a/microprofile/grpc/server/src/main/java/module-info.java b/microprofile/grpc/server/src/main/java/module-info.java index 9b28f9214b1..798a8501730 100644 --- a/microprofile/grpc/server/src/main/java/module-info.java +++ b/microprofile/grpc/server/src/main/java/module-info.java @@ -27,7 +27,6 @@ requires io.helidon.microprofile.server; requires io.helidon.config.mp; - requires io.grpc.protobuf.lite; requires com.google.protobuf; requires java.logging; From b633aa22997bfad92cd019a416eb5ef9dde3c7a3 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Wed, 13 Nov 2024 16:56:19 -0800 Subject: [PATCH 4/5] fix copyright --- .../src/main/java/io/helidon/grpc/core/MarshallerSupplier.java | 2 +- grpc/core/src/main/java/module-info.java | 2 +- microprofile/grpc/server/src/main/java/module-info.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java index 4f48fa532ea..e1cb03cb5bb 100644 --- a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java +++ b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc/core/src/main/java/module-info.java b/grpc/core/src/main/java/module-info.java index 8c68f292753..9d4da6b0663 100644 --- a/grpc/core/src/main/java/module-info.java +++ b/grpc/core/src/main/java/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/microprofile/grpc/server/src/main/java/module-info.java b/microprofile/grpc/server/src/main/java/module-info.java index 798a8501730..94293912ffd 100644 --- a/microprofile/grpc/server/src/main/java/module-info.java +++ b/microprofile/grpc/server/src/main/java/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 801e601a93e8fe89a1797ab90083904b9e770bd9 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Thu, 14 Nov 2024 09:21:50 -0800 Subject: [PATCH 5/5] Fix native-image build for Netty 4.1.115 --- .../helidon-webserver/native-image.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/webserver/webserver/src/main/resources/META-INF/native-image/io.helidon.webserver/helidon-webserver/native-image.properties b/webserver/webserver/src/main/resources/META-INF/native-image/io.helidon.webserver/helidon-webserver/native-image.properties index 5c296b9268b..27816cb1f53 100644 --- a/webserver/webserver/src/main/resources/META-INF/native-image/io.helidon.webserver/helidon-webserver/native-image.properties +++ b/webserver/webserver/src/main/resources/META-INF/native-image/io.helidon.webserver/helidon-webserver/native-image.properties @@ -27,6 +27,7 @@ Args=--initialize-at-run-time=io.netty.buffer.UnpooledByteBufAllocator$Instrumen --initialize-at-run-time=io.netty.handler.codec.compression.Lz4FrameDecoder \ --initialize-at-run-time=io.netty.handler.codec.compression.Lz4FrameEncoder \ --initialize-at-run-time=io.netty.handler.codec.compression.LzmaFrameEncoder \ + --initialize-at-run-time=io.netty.handler.codec.compression.Zstd \ --initialize-at-run-time=io.netty.handler.codec.compression.ZstdOptions \ --initialize-at-run-time=io.netty.handler.codec.http.HttpObjectEncoder \ --initialize-at-run-time=io.netty.handler.codec.http2.CleartextHttp2ServerUpgradeHandler \