client-go: Package upgrade blocked
Please refer to the command and its output below:
go get -u ./...
# k8s.io/client-go/applyconfigurations/meta/v1
/go/pkg/mod/k8s.io/client-go@v0.23.5/applyconfigurations/meta/v1/unstructured.go:64:37: cannot use doc (type *"github.com/googleapis/gnostic/openapiv2".Document) as type *"github.com/google/gnostic/openapiv2".Document in argument to "k8s.io/kube-openapi/pkg/util/proto".NewOpenAPIData
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 25
- Comments: 20 (6 by maintainers)
Commits related to this issue
- TBD: Testing locking kube-openapi TO BE DETERMINED: Testing locking the kube-openapi version to a release that still supports Kubernetes v0.23 releases. Per known limitations with the newer kube-open... — committed to cjschaef/installer by cjschaef 2 years ago
- Move to latest release of k8s.io/client-go: The released version solves: https://github.com/kubernetes/client-go/issues/1075 Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com> — committed to jacobweinstock/smee by jacobweinstock 10 months ago
- Move to latest release of k8s.io/client-go: The released version solves: https://github.com/kubernetes/client-go/issues/1075 Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com> — committed to jacobweinstock/smee by jacobweinstock 10 months ago
- Move to latest release of k8s.io/client-go: (#340) ## Description The released version solves: https://github.com/kubernetes/client-go/issues/1075 ## Why is this needed Fixes: # ## How Has Thi... — committed to tinkerbell/smee by mergify[bot] 10 months ago
i was able to fix this by replacing the
k8s.io/kube-openapientry in the go.mod in my project with this:go get -u ./...is not likely to work seamlessly with v0 modules, which includes client-go and many of its dependencies (including gnostic, mergo, and others).client-go is tested with the versions of dependencies referenced from its go.mod file, but newer versions of v0… dependencies may or may not work correctly with client-go
When client-go v0.28.x is released (~August 2023), this specific conflict between gnostic and gnostic-models will be resolved.
/close
update to
v0.24.0-alpha.4, it helped meThis is still broken https://github.com/kubernetes/client-go/issues/1269
Adding this to my
go.modfixed some of the openapi type errors I was running into:Same here, but I think it already got resolved in an upcoming version:
Here the correct pkg gets imported: https://github.com/kubernetes/client-go/blob/v0.24.0-alpha.4/discovery/discovery_client.go#L32