-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Issue at compilation time when required with dep #417
Comments
what branches are you using? |
My [[constraint]]
name = "k8s.io/client-go"
version = "7.0.0" The [[projects]]
name = "k8s.io/client-go"
packages = [
"discovery",
"kubernetes",
"kubernetes/scheme",
"kubernetes/typed/admissionregistration/v1alpha1",
"kubernetes/typed/admissionregistration/v1beta1",
"kubernetes/typed/apps/v1",
"kubernetes/typed/apps/v1beta1",
"kubernetes/typed/apps/v1beta2",
"kubernetes/typed/authentication/v1",
"kubernetes/typed/authentication/v1beta1",
"kubernetes/typed/authorization/v1",
"kubernetes/typed/authorization/v1beta1",
"kubernetes/typed/autoscaling/v1",
"kubernetes/typed/autoscaling/v2beta1",
"kubernetes/typed/batch/v1",
"kubernetes/typed/batch/v1beta1",
"kubernetes/typed/batch/v2alpha1",
"kubernetes/typed/certificates/v1beta1",
"kubernetes/typed/core/v1",
"kubernetes/typed/events/v1beta1",
"kubernetes/typed/extensions/v1beta1",
"kubernetes/typed/networking/v1",
"kubernetes/typed/policy/v1beta1",
"kubernetes/typed/rbac/v1",
"kubernetes/typed/rbac/v1alpha1",
"kubernetes/typed/rbac/v1beta1",
"kubernetes/typed/scheduling/v1alpha1",
"kubernetes/typed/settings/v1alpha1",
"kubernetes/typed/storage/v1",
"kubernetes/typed/storage/v1alpha1",
"kubernetes/typed/storage/v1beta1",
"pkg/apis/clientauthentication",
"pkg/apis/clientauthentication/v1alpha1",
"pkg/version",
"plugin/pkg/client/auth/exec",
"rest",
"rest/watch",
"tools/auth",
"tools/clientcmd",
"tools/clientcmd/api",
"tools/clientcmd/api/latest",
"tools/clientcmd/api/v1",
"tools/metrics",
"tools/reference",
"transport",
"util/cert",
"util/flowcontrol",
"util/homedir",
"util/integer"
]
revision = "23781f4d6632d88e869066eaebb743857aa1ef9b"
version = "v7.0.0" So, I'm using the v7.0.0 tag. |
client-go v7.0.0 depends on k8s.io/apimachinery 31dade610c053669d8054bfd847da657251e8c1a: https://github.com/kubernetes/client-go/blob/v7.0.0/Godeps/Godeps.json#L373-L376 the referenced type exists at that revision https://github.com/kubernetes/apimachinery/blob/31dade610c053669d8054bfd847da657251e8c1a/pkg/api/meta/restmapper.go#L90-L92 |
With dep you have to pin all dependencies (especially those under the k8s.io org) to the right versions. For client-go 7.0.0 use the kubernetes-1.10.0 tags on the other k8s.io repos. |
@sttts It works when specifying the version instead of branch in the Gopkg.toml. However... isn't wired that the default use case with dep doesn't work? I'm not an expert of |
@seblegall compare kubernetes/publishing-bot#55. Looks like dep's SAT algorithm falls over. Actually though, nobody has found out whether we have a mistake in our (experimentally) shipped Gopkg.tomls or whether dep just explodes. |
@sttts Well, did you also try to migrate to vgo? 🤣 |
I think nobody dared to try that yet for the whole kube. Maybe just for client-go and friends it's feasible. |
I may take some time in the next few days to test vgo on my own project (that require the go-client), then, I may test vgo also on the go-client. Keep you updated. |
also running into this issue with |
+1 |
Also having this issue.. Can anyone suggest a fix? Im blocked right now |
You have to put this explicitly in your [[constraint]]
name = "k8s.io/api"
version = "kubernetes-1.9.0"
[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.9.0"
[[constraint]]
name = "k8s.io/client-go"
version = "6.0.0" In this example I have set the version to |
@cheynewallace setting the client-go to reference master solves the problem as well:
|
not a good idea. We have no guarantees whatsoever about compatibility with former or future Kube versions. |
@sttts, you are absolutely right. I should have added a warning for this workaround. |
Thanks @seblegall , that one solved it for me.. |
actually I did try, and indeed I ended up in a situation where all staging repositories were behaving, but no solution could be found for the main repo. |
@sigma am curious, can you upload your experiments to a branch? |
vgo and kubernetes: kubernetes/kubernetes#65683 ✨ |
About dep, I found that it works well to use the same tag for |
Yes, that's recommended. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@seblegall wrote:
How does one go about finding the "right version of k8s.io/*", given a certain client-go version, e.g. v9.0.0? |
@808codist Give this tool a try https://github.com/ash2k/kubegodep2dep |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi,
It seems that there is a compilation error when the client-go is required from
dep
.The
dep ensure
command goes well. But then...go build
output this error :# github.com/seblegall/test-k8s-go-client/vendor/k8s.io/client-go/discovery vendor/k8s.io/client-go/discovery/restmapper.go:42:75: undefined: meta.VersionInterfacesFunc vendor/k8s.io/client-go/discovery/restmapper.go:176:19: undefined: meta.VersionInterfacesFunc
Steps to reproduce this error :
dep init
go build
I originally had this trouble when trying to do a
dep update
on project that use this dependency : https://github.com/Meetic/blackbeardI'm using :
go version go1.9.2 darwin/amd64
dep version
output (I'm using dep build from source and I'm up to date with master) :The text was updated successfully, but these errors were encountered: