Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in generation of .proto files #1702

Closed
geekodour opened this issue Jan 10, 2019 · 1 comment
Closed

Inconsistency in generation of .proto files #1702

geekodour opened this issue Jan 10, 2019 · 1 comment

Comments

@geekodour
Copy link
Contributor

I tried generating .proto files using make proto

It generated files with a lot of differences as discussed in #1682 and the helpful top comment also got removed. (gist attached)

As alertmanager uses the gogo/protobuf implementation,

from the gogo/protobuf readme

protoc-gen-gogofast (same as gofast, but imports gogoprotobuf)
protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields)
protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods)

and genproto.sh uses gogofast

protoc --gogofast_out=plugins=grpc:. -I=. \

so it is supposed to generate the XXX_unrecognized when using gogofast but the files in master do not show any XXX_unrecognized

What did you do?

- Install protoc`v3.5.1`
- go install github.com/gogo/protobuf/protoc-gen-gogo
- go install github.com/gogo/protobuf/protoc-gen-gogofast
- go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
- go get golang.org/x/tools/cmd/goimports

I even tried installing downto v0.4 of gogo/protobuf for protoc-gen-gogo

What did you expect to see?
What @juliusv generated,
diff: https://gist.github.com/juliusv/033a489a93c118be9184457c44b9cc63

What did you see instead? Under which circumstances?
make proto
diff: https://gist.github.com/geekodour/52ae6d8283996b88c064526f97aafdcf

Environment

  • System information:
    Linux 4.13.9-300.fc27.x86_64 x86_64
  • Alertmanager version:
    master

cc: @fabxc @juliusv

@simonpasquier
Copy link
Member

This is because scripts/genproto.sh doesn't lock down the versions of its dependencies. Eventually we need to implement the same mechanism as prometheus/prometheus#5075.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants