os72 / protoc-jar

Protocol Buffers protobuf compiler - multi-platform executable protoc JAR and API
Apache License 2.0
137 stars 81 forks source link

Protoc-jar works localy but fails in Docker #96

Open schananas opened 3 years ago

schananas commented 3 years ago

Helo, I'm using jmeter-grpc-request plugin for JMeter, which uses protoc-jar lib

Since this plugin uses Protoc.runProtoc, which I identified as root of my issues I'm writing here.

Protoc does not produce same result while working locally (OSX) and while working in Docker (linux-x86_64, Ubuntu image).

While running everything locally there are no issues, but when trying to move everything to Docker I get lots of errors that I don't understand:


#14 60.72 2021-08-06 13:48:36,319 WARN v.z.b.c.p.ProtocInvoker: Protoc invocation failed with status: 1
#14 60.72 2021-08-06 13:48:36,319 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: protoc version: 3.10.1, detected platform: linux-x86_64 (linux/amd64)
#14 60.72 2021-08-06 13:48:36,319 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: embedded: bin/3.10.1/protoc-3.10.1-linux-x86_64.exe
#14 60.72 2021-08-06 13:48:36,319 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: executing: [/tmp/protocjar6843259621352728925/bin/protoc.exe, /root/.bzt/api/src/main/proto/query.proto, /root/.bzt/api/src/main/proto/control.proto, /root/.bzt/api/src/main/proto/event.proto, /root/.bzt/api/src/main/proto/common.proto, /root/.bzt/api/src/main/proto/command.proto, -I/root/.bzt, -I/tmp/polyglot-well-known-types2403617750231761169, -I/root/.bzt/api/src/main/proto, --descriptor_set_out=/tmp/descriptor4844292755077694259.pb.bin, --include_imports]

and lots of errors like:

#14 60.72 axon-server-api/src/main/proto/common.proto:132:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it.  Therefore, "FAILED" must be unique within "io.axoniq.axonserver.grpc", not just within "TaskStatus".
#14 60.72 api/src/main/proto/common.proto:134:5: "io.axoniq.axonserver.grpc.RUNNING" is already defined in file "common.proto".
#14 60.72 api/src/main/proto/common.proto:134:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it.  Therefore, "RUNNING" must be unique within "io.axoniq.axonserver.grpc", not just within "TaskStatus".
#14 60.72 api/src/main/proto/common.proto:136:5: "io.axoniq.axonserver.grpc.CANCELLED" is already defined in file "common.proto".
#14 60.72 api/src/main/proto/common.proto:136:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it.  Therefore, "CANCELLED" must be unique within "io.axoniq.axonserver.grpc", not just within "TaskStatus".
#14 60.72 api/src/main/proto/common.proto:126:6: "io.axoniq.axonserver.grpc.TaskStatus" is already defined in file "common.proto".
#14 60.72 api/src/main/proto/common.proto:38:9: "io.axoniq.axonserver.grpc.SerializedObject" seems to be defined in "common.proto", which is not imported by "api/src/main/proto/common.proto".  To use it here, please add the necessary import.
#14 60.72 api/src/main/proto/common.proto:46:5: "io.axoniq.axonserver.grpc.ProcessingKey" seems to be defined in "common.proto", which is not imported by "api/src/main/proto/common.proto".  To use it here, please add the necessary import.
#14 60.72 api/src/main/proto/common.proto:49:5: "io.axoniq.axonserver.grpc.MetaDataValue" seems to be defined in "common.proto", which is not imported by "api/src/main/proto/common.proto".  To use it here, please add the necessary import.

My proto files starts with:

syntax = "proto3";
package mypackage.grpc.command;
import "common.proto";
option java_multiple_files = true;

The wierd thing that I can't understand, is why it's producing these errors while running inside Docker?

Hope someone can help as I reached a dead end with this.

os72 commented 3 years ago

Those errors seem to be generated by protoc itself?