Open andreiyusupau opened 3 weeks ago
/cc @alesj (grpc), @cescoffier (grpc), @maxandersen (jbang), @quarkusio/devtools (jbang)
Does protoc
work on Alpline?
(In general, I do not recommend Alpine; UBI should work)
@cescoffier it worked fine with Quarkus 3.10.0. Also as I can see official Docker image has only Alpine-based distributions.
We had to update protoc because of CVE. The new version has new native dependencies. Try installing protoc directly and see if it works, I believe it won't.
I've updated my Dockerfile to use local protoc installation:
FROM docker:27.1.2
RUN apk update
RUN apk upgrade
RUN apk add curl bash
RUN apk add gradle
RUN apk add protoc
RUN curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
RUN curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
COPY . .
RUN gradle build -Dquarkus.grpc.protoc-path=/usr/bin/protoc
CMD ["tail", "-f","/dev/null"]
But it seems that parameter -Dquarkus.grpc.protoc-path
doesn't work, because I'm getting the following error:
84.53 > Task :quarkusGenerateCode
109.5
109.5 /build/io.grpc-protoc-gen-grpc-java-linux-x86_64-exe: program not found or is not executable
109.5 Please specify a program using absolute path or make sure the program is available in your PATH system variable
109.5 --grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
109.5
109.5 > Task :quarkusGenerateCode FAILED
109.5
109.5 FAILURE: Build failed with an exception.
Is there a way to specify local protoc to be used in gradle build process?
You need https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.38.0/
.
Usage of https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.38.0/ (along with this plugin to execute the proto files compilation https://github.com/google/protobuf-gradle-plugin) together with with Quarkus leads to this issue: https://github.com/google/protobuf-gradle-plugin/issues/659
Describe the bug
I'm running into following exception when trying to run
gradle build
on simple Quarkus app using grpc plugin:Expected behavior
Like in Quarkus 3.10.0 project builds fine.
Actual behavior
In Quarkus 3.13.3 build fails.
How to Reproduce?
Create a sample app with grpc extension using gradle via https://code.quarkus.io. Put the following Dockerfile into a project folder and run
docker build .
:P.S. In reality I encounter this error when using Gitlab pipelines, this Dockerfile just emulates it's behavior.
Output of
uname -a
orver
No response
Output of
java -version
21.0.4
Quarkus version or git rev
3.13.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)gradle 8.7
Additional information
I've checked this issue https://github.com/quarkusio/quarkus/issues/13773 and if it's bug with
protoc
versions like stated here any suggestions on fixing dependencies or using custom protoc would be also great :) Guide (https://quarkus.io/guides/grpc-getting-started) says about special property to specify customprotoc
implementation-Dquarkus.grpc.protoc-path=/path/to/protoc.
, but I didn't understand if it suites for gradle or it's only solution forquarkus-maven-plugin
.