-
Notifications
You must be signed in to change notification settings - Fork 75
rename metrics.proto #44
Copy link
Copy link
Closed
Description
I was testing apache beam with our source (which uses prometheus) and ran into this problem:
panic: proto: file "metrics.proto" is already registered
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1(0x15b7a18, 0xc00039d340, 0x1590780, 0xc0003a5ec0, 0xc00039d340)
/home/matthew/go/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:54 +0x25f
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc000118540, 0x15bbcb8, 0xc00039d340, 0x0, 0x0)
/home/matthew/go/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:128 +0xc58
google.golang.org/protobuf/internal/filedesc.Builder.Build(0x0, 0x0, 0xc0000fea00, 0x659, 0x700, 0xb00000001, 0x0, 0x159d4c0, 0xc00011c3c0, 0x15a93d0, ...)
/home/matthew/go/pkg/mod/google.golang.org/protobuf@v1.26.0/internal/filedesc/build.go:113 +0x1aa
github.com/golang/protobuf/proto.RegisterFile(0x13f2f8b, 0xd, 0x1d4f600, 0x299, 0x299)
/home/matthew/go/pkg/mod/github.com/golang/protobuf@v1.5.2/proto/registry.go:48 +0x148
github.com/prometheus/client_model/go.init.1()
/home/matthew/go/pkg/mod/github.com/prometheus/client_model@v0.2.0/go/metrics.pb.go:677 +0x5a
The problem as has been explained to me in the protobuf gophers slack is that all protobuf file names must be globally unique. Any chance this proto file name can be changed or something unlikely to conflict?
See https://gophers.slack.com/archives/C0FSEE1UJ/p1622473569090000 for details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels