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

go get upgrade broke compilation #396

Open
regnaio opened this issue Jun 1, 2023 · 1 comment
Open

go get upgrade broke compilation #396

regnaio opened this issue Jun 1, 2023 · 1 comment

Comments

@regnaio
Copy link

regnaio commented Jun 1, 2023

Updated packages using go get -u ./...

Then, I tried running a go file using go run <FILE>

Got the error message:

cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document

# k8s.io/client-go/applyconfigurations/meta/v1
/go/pkg/mod/k8s.io/client-go@v0.27.2/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData
@isaaguilar
Copy link

Not sure if this will work for you, but I fixed it for myself by going to the client-go project and checking out the tag I was interested in. In your example, that would be v0.27.2. I then opened the go.mod file and found the k8s.io/kube-openapi version. https://github.com/kubernetes/client-go/blob/v0.27.2/go.mod#L30

I updated my go.mod to this version for k8s.io/kube-openapi.

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

No branches or pull requests

2 participants