jaegertracing / docker-protobuf Goto Github PK
View Code? Open in Web Editor NEWAn all-inclusive protoc Docker image for the Jaeger project
Home Page: https://hub.docker.com/r/jaegertracing/protobuf
License: Apache License 2.0
An all-inclusive protoc Docker image for the Jaeger project
Home Page: https://hub.docker.com/r/jaegertracing/protobuf
License: Apache License 2.0
As of now, proto-gen-csharp
can not be used because google/api/annotations.proto
, gogoproto/gogo.proto
and protoc-gen-swagger/options/annotations.proto
are not created but necessary for reflection (which can't be removed).
gogoproto/goto.proto
can't be generated in C# since it's using proto2
syntax which only got added with Protocol Buffers v3.11.0
which was available starting gRPC v1.27.0
. This docker currently targets 1.26.0
.
Add the following to the proto
target:
$(PROTOC) \
$(PROTO_INCLUDES) \
--csharp_out=internal_access,base_namespace:${PROTO_GEN_CSHARP_DIR} \
gogoproto/gogo.proto
--csharp_out: gogo.proto: C# code generation only supports proto3 syntax
Makefile:70: recipe for target 'proto' failed
make: *** [proto] Error 1
The files should be generated to proto-gen-csharp
.
I will update the Dockerfile
to use the latest set of versions.
I will create a PR myself.
The docker image contains various proto files which are dependencies (gogoproto/gogo.proto
, protoc-gen-swagger/options/annotations.proto
) for Jaeger's model.proto
and services like query.proto
...
The code generation to various languages works fine. However the generated code requires dependencies on the included proto dependencies as these are not generated (they are just used by protoc
at the generation phase) so the code fails at runtime on missing symbols. The problem is that there are no official jars
(or packages in other languages).
To make the generated code work in Java I had to add these dependencies:
<!-- fix missing symbols GoGoProtos -->
<dependency>
<groupId>com.github.QubitProducts</groupId>
<artifactId>gogoproto-java</artifactId>
<version>1.0.0</version>
</dependency>
<!-- fix missing class grpc.gateway.protoc_gen_swagger.options.Annotations -->
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>receiver-proto</artifactId>
<version>6.6.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
Right now we don't have any validation that any changes to the image will not break the repos where it is consumed, namely jaeger
and jaeger-idl
.
Proposal: Add a CI workflow that will check out those repos as part of the CI, and run their proto build steps using the new version of the image. This may involve tweaking their Makefiles to allow overriding image version (but may already be supported, needs to be verified).
This repository was originally forked from TheThingsIndustries/docker-protobuf, which has included many improvements to the builder, including support for more languages and newest gRPC versions. The gRPC version bump alone would be a welcome change (see jaegertracing/jaeger#2443), as it's not simply a version change: apparently, the way the gRPC binaries are built has changed significantly.
It appears as well that C# has been supported upstream, which might be enough for us to remove our custom C# builder. Input from @Falco20019 is required here to confirm this is the case.
annanay25:jaeger-docker-protobuf:latest
image. Move to the jaegertracing user on dockerhub/quayI find it somewhat annoying that GitHub keeps showing stats on how far away this repo is from TheThingsIndustries/docker-protobuf
, even though we have no plans to re-sync them.
I propose
Currently the image built here cannot be used on Macs that use Apple hardware, because the image is only built for amd64 architecture. It would be great to extent this to include arm64, similar to how we build multi-arch images in Jaeger.
Hi! I'm running the following from StackOverflow (but also from reading the docs here):
docker run --rm -u $$(id -u) -v${PWD}/src/api:/source \
-v${PWD}/src/api:/output \
-w/source jaegertracing/protobuf \
--go_out=/output \
--go_opt=paths=source_relative \
--go-grpc_out=/output \
--go-grpc_opt=paths=source_relative \
--proto_path=/source \
-I/usr/include/google/protobuf /source/*.proto
Expectation
This should generate two files, one of them being the service.
Problem
This generates a single file for my protobuf file, but there's no service generated.
Extra info
I can't use --plugins=grpc
anywhere, because it says "--plugins is not supported", so I guess that's why the service isn't being generated.
Is there something I'm missing here? If it doesn't support grpc for Go then there's not much point of listing it as an option? Is it just not possible to generate a Go grpc service with this container and so another solution is needed?
The docker image currently loads too many modules that are not required for code generation for the jaeger project. Tracking issue to list out the dependencies and only load them.
We recently added an arm64 architecture to this docker image, but it was only tested for generating Go types in the main repository https://github.com/jaegertracing/jaeger. In contrast, https://github.com/jaegertracing/jaeger-idl repository uses the same image to generate (as a test) types for different languages. According to jaegertracing/jaeger-idl#105, it does not work for Java or .NET when running on ARM chip.
Hi, I am trying to generate the the code for jaeger exporter to support protobuf via grpc for open-telemetry. Below are the steps I used to generate the code for python
docker run --rm -u $(id -u) -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --proto_path=${PWD} \ --python_out=${PWD} --grpc-python_out=${PWD} -I/usr/include/github.com/gogo/protobuf ${PWD}/model.proto ${PWD}/collector.proto
After this step It gave gogoproto import error ModuleNotFoundError: No module named 'gogoproto'
.
There is one point in README that says The generated code might require dependencies on packages like GoGo or Swagger, then I tried to generate the code for that dependency using
docker run --rm -u $(id -u) -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --proto_path=${PWD} \ --python_out=${PWD} /usr/include/github.com/gogo/protobuf/gogoproto/gogo.proto
This generated some code and I moved this to gen/
and when I try to run it crashes with this error
E TypeError: Couldn't build proto file into descriptor pool!
E Invalid proto descriptor for file "model.proto":
E gogoproto/gogo.proto: Import "gogoproto/gogo.proto" has not been loaded.
I looked up if jaeger-python-client has the generated files. It seems the official client supports thrift only as of now. I would really appreciate if you can help with code generation with protobuf.
...
...
...
...
...
...
...
Always works fine with other language but go demand protoc-gen-go-grpc to generate proper files
docker run --rm -u ${UID} -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --go_out=grpc/go/grpc --proto_path=${PWD} --go-grpc_out=. --go-grpc_opt=paths=source_relative helloworld.proto
protoc-gen-go-grpc: program not found or is not executable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.
docker run --rm -u ${UID} -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --go_out=grpc/go/grpc --proto_path=${PWD} --go-grpc_out=. --go-grpc_opt=paths=source_relative helloworld.proto
protoc-gen-go-grpc: program not found or is not executable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.
command end without error
Linux
...
not shure
not without propositions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.