Giter Club home page Giter Club logo

docker-protobuf's People

Contributors

annanay25 avatar cerisier avatar erwinvaneyk avatar falco20019 avatar htdvisser avatar joe-elliott avatar johanstokking avatar kanziw avatar krishnaiyer avatar mmorel-35 avatar moul avatar pavolloffay avatar quentinperez avatar rvolosatovs avatar steeve avatar yurishkuro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-protobuf's Issues

Get C# to working

Summary

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.

Steps to Reproduce

Add the following to the proto target:

	$(PROTOC) \
		$(PROTO_INCLUDES) \
		--csharp_out=internal_access,base_namespace:${PROTO_GEN_CSHARP_DIR} \
		gogoproto/gogo.proto

What do you see now?

--csharp_out: gogo.proto: C# code generation only supports proto3 syntax
Makefile:70: recipe for target 'proto' failed
make: *** [proto] Error 1

What do you want to see instead?

The files should be generated to proto-gen-csharp.

How do you propose to implement this?

I will update the Dockerfile to use the latest set of versions.

Can you do this yourself and submit a Pull Request?

I will create a PR myself.

Generate code from proto files included in the image

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>

More in jaegertracing/jaeger-analytics-java#34 (comment)

Add CI workflow to validate generated Docker image against other Jaeger repos

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).

Rebase with the latest upstream

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.

Disconnect from upstream repo

I 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

  • make a clean break by recreating the repo
  • include an attribution notice to the original author

@annanay25 @pavolloffay

Add ARM64 architecture to the Docker image

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.

Service not generated at all for Go

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?

Code generation for opentelemetry python jaeger exporter.

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

Generate language specific code

  1. 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'.

Generate dependency code

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.

Missing protoc-gen-go-grpc

Summary

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.

Steps to Reproduce

  1. download https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto
  2. launch command 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

What do you see now?

protoc-gen-go-grpc: program not found or is not executable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.

What do you want to see instead?

command end without error

Environment

Linux

...

How do you propose to implement this?

not shure

Can you do this yourself and submit a Pull Request?

not without propositions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.