-
Notifications
You must be signed in to change notification settings - Fork 3k
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
github.com/google/gnostic/openapiv2 moved to github.com/google/gnostic-models/openapiv2 #1269
Comments
The title of this ticket is almost entirely useless. it should be something like |
|
i'm getting
with
I've managed to workaround this by adding this to
|
I had the same issue with The following change to my require (
// ...
- k8s.io/client-go v0.27.3
+ k8s.io/client-go v0.28.0-alpha.3
// ...
) Thanks @miparnisari! |
In my env, this can be solved with a light touch, without using an alpha release of client-go, by running the following: go get k8s.io/kube-openapi@2546d827e515dca59571ec245eef2302e11018e1 && go mod tidy Kube-openapi is the entity which injects the dependency on gnostic-models and breaks backwards compatibility. This resets it to the commit before the change to |
Thank you so much for this!!! I was bugging around this like two days. |
Definitely appreciate the workaround |
Done with: go get k8s.io/kube-openapi@2546d827e515dca59571ec245eef2302e11018e1 && go mod tidy See: kubernetes/client-go#1269
go: downgraded k8s.io/kube-openapi v0.0.0-20230718181711-3c0fae5ee9fd => v0.0.0-20230525220651-2546d827e515 ref: kubernetes/client-go#1269 Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
having the same mystery issue trying to doing some updates, if anyone searches for exact error and want to use the workaround above (which worked, thx!) - my error was:
|
Agree that using the specific versions of dependencies like kube-openapi and gnostic matching what is referenced by the client-go version you are using is the correct solution here. See the comment at #1075 (comment) about updating to latest commits of v0 dependencies belong likely to cause issues. |
probably a huge faq/can of worm but why isn't k8s using 1.x instead of 0.x go packages where x == k8s 1.x, why not 1.x directly? I'm aware of issues with go and v2 but... this is not about v2... v0->v1 and v1 updates are still smooth sailing afaik? |
The kubernetes project essentially spends all its API compatibility effort budget on maintaining REST API compatibility. The exported go package APIs don't maintain perfect compatibility across releases (function signatures occasionally change, etc), so we don't want to make a promise about compatibility we don't think we can keep by versioning these go libraries as v1.x |
ic... it's true to the letter of semver but practically people do expect on MAJOR.MINOR.PATCH that when MINOR changes, something changed, and it would probably be less confusing if MAJOR of go matched MAJOR of k8s (== 1 for the forseable future) like you make MINOR,PATCH match but thanks though for the rationale (and having taken the time to reply ❤️), it makes sense as well but is a bit too "pure" imo |
go: downgraded k8s.io/kube-openapi v0.0.0-20230718181711-3c0fae5ee9fd => v0.0.0-20230525220651-2546d827e515 ref: kubernetes/client-go#1269 Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
go: downgraded k8s.io/kube-openapi v0.0.0-20230718181711-3c0fae5ee9fd => v0.0.0-20230525220651-2546d827e515 ref: kubernetes/client-go#1269 Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
see google/gnostic#397 and the workaround in kubernetes/client-go#1269 (comment)
Update all the k8s dependencies together. Sometimes when we, or dependabot, attempt to update dependencies separately, we get build errors because k8s libraries are expected to run with the same semantic version. This is noted in kubernetes/client-go#1269 Let's group the k8s dependencies into a single patch so we reduce the possibility of build issues due to compatibility issues between client libraries.
ran: // see kubernetes/client-go#1269 (comment) - go get k8s.io/kube-openapi@2546d827e515dca59571ec245eef2302e11018e1 && go mod tidy // we need to use a commit hash rather than a point release because // a new 1.5.0 release is not out yet, but 1.4.0 doesn't work with controller-runtime v0.15.z // this will need to change to v1.5.0 once it is released. - go get sigs.k8s.io/cluster-api-provider-gcp@f1ea13261b0f929beca8c65d932046003caa652d && go mod tidy - go mod vendor -
Thank you a lot! The So only your solution works! |
plus controller-runtime, openshift API, scheduler plugins includes fix per kubernetes/client-go#1269 Signed-off-by: Francesco Romani <fromani@redhat.com>
plus controller-runtime, openshift API, scheduler plugins includes fix per kubernetes/client-go#1269 Signed-off-by: Francesco Romani <fromani@redhat.com>
the same trouble in v0.27.1, change to v0.28.1, it works
|
Facing same issue in v0.28.1 . Can anyone help? |
I am seeing this error when upgrading from client-go v0.28.2 to v0.30.2 |
in my env, this can be solved by upgrading version of
In fact, the kustomize version should be same as kustomize version used in https://github.com/kubernetes/kubernetes/blob/master/go.mod Remember to confirm the version of k8s package you referenced |
~/go/pkg/mod/k8s.io/client-go@v0.27.3/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
The text was updated successfully, but these errors were encountered: