-
Notifications
You must be signed in to change notification settings - Fork 10k
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
protobuf: avoid registering generic protobuf files globally #19682
Comments
It seems you're looking for matches in the Note that the dependency versions from older release branches do not necessarily match the ones from |
The specific line is also in the etcd/api/etcdserverpb/rpc.pb.go Line 6154 in a17edfd
Yes, that is what I'm referring to. As mentioned above, |
Thanks for the reply, @aead. I missed some of your initial input. Sorry for the confusion. I've tried regenerating the Go files from the |
Bug report criteria
What happened?
Building and running a go binary depending on the
go.etcd.io/etcd/api/[email protected]
module fails with:What did you expect to happen?
No panic at runtime due to conflicting files.
How can we reproduce it (as minimally and precisely as possible)?
rpc.proto
orrecord.proto
file containing some arbitrary protobuf definitions and generate the corresponding Go code using protoc.go.etcd.io/etcd/api/v3
Anything else we need to know?
This issue is caused by the generated
*.pb.go
files - specially:etcd/server/storage/wal/walpb/record.pb.go
Line 119 in c983744
etcd/api/etcdserverpb/rpc.pb.go
Line 6154 in ac31c34
I'm not sure why the protobuf files contain the
init
function registering their file names globally without any qualifying package prefix. However, I can confirm that:The
grep
does not find any such call toRegisterFile
in myprotobuf
package containing the generated go code. Maybe, older versions orprotoc
generated such a call but not sure.In general it seems problematic to "manually" register the filename like this since any other project depending on etcd could have a name conflict causing the builds to fail. Another issue related to this is: #18341
A potential fix could be to delete the two linked auto-generated
pb.go
files and re-generate them.Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
paste your configuration here
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
The text was updated successfully, but these errors were encountered: