Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Update protobuf dependency #125

Open
gwenaskell opened this issue Jun 16, 2020 · 1 comment
Open

Update protobuf dependency #125

gwenaskell opened this issue Jun 16, 2020 · 1 comment

Comments

@gwenaskell
Copy link

gwenaskell commented Jun 16, 2020

Hello,

We have been using the client for the last few months without problem until we had to update protobuf to be able to use the https://github.com/google/go-containerregistry project.

This leads to the following panic upon initialization:

panic: mismatching message name: got k8s.io.kubernetes.pkg.watch.versioned.Event, want github.com/ericchiang.k8s.watch.versioned.Event

goroutine 1 [running]:
google.golang.org/protobuf/internal/impl.legacyLoadMessageDesc(0x55ba9b96e7e0, 0x55ba9b8f6140, 0x55ba9b735203, 0x2f, 0x0, 0x0)
	/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go:136 +0x884
google.golang.org/protobuf/internal/impl.legacyLoadMessageInfo(0x55ba9b96e7e0, 0x55ba9b8f6140, 0x55ba9b735203, 0x2f, 0x55ba9b171219)
	/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go:48 +0xbf
google.golang.org/protobuf/internal/impl.Export.LegacyMessageTypeOf(0x55ba9b963e60, 0x0, 0x55ba9b735203, 0x2f, 0xc00003c9a0, 0xc000109450)
	/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go:33 +0xa7
github.com/golang/protobuf/proto.RegisterType(0x55ba9b963e60, 0x0, 0x55ba9b735203, 0x2f)
	/vendor/github.com/golang/protobuf/proto/registry.go:186 +0x4f
github.com/ericchiang/k8s/watch/versioned.init.0()
	/vendor/github.com/ericchiang/k8s/watch/versioned/generated.pb.go:76 +0x4d

I have tested by changing the expected input as suggested in this thread: https://stackoverflow.com/questions/61251129/how-to-fix-conflicts-with-this-error-message.
I haven't observed any bug after this change, but I would not rely on a manual editing of the source code.

Is there any plan to upgrade protobuf to the latest version soon?

Thanks

@AlfredBroda
Copy link

Some CI tools (Circle, Travis) seem to be bumping up protobuf version regardless of the version specified in go.mod. This issue is getting really annoying.

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

No branches or pull requests

2 participants