-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: go get failing with vague error 'unknown revision v0.0.0' with kubernetes #32776
Comments
The errors such as Likely related to #27173 (comment) and #27173 (comment). |
@thepudds is there a workaround to this issue? |
We have replace directives setup for these though: https://github.com/kubernetes/kubernetes/blob/e8738d665b29ca98d39a7907a83ef34dfbb5c5e3/go.mod#L436 Looks like |
So a module-based consumer of k8s.io/api for example does not use any From https://golang.org/cmd/go/#hdr-The_main_module_and_the_build_list:
|
k8s.io/kubernetes is not primarily intended to be consumed as a module. Only the published subcomponents are (and go get works properly with those). If you want to consume k8s.io/kubernetes as a module, you'd probably need to add require directives for matching versions of all of the subcomponents, rather than using go get |
@liggitt I am not using kubernetes/kubernetes. I am using client-go These are some of the ones I am using
|
@joshmsamuels could you try to put together a minimal set of steps to reproduce, ideally starting with an empty module? (E.g., something like |
@thepudds Should I like make a main.go for that then? |
It sounds like the Go command is working as intended, but let's make sure we can reproduce this before closing. @joshmsamuels please do post a minimal example to help us see the same error. A gist or a small repo with a As others have pointed out, Kubernetes has a complicated system for managing dependencies, and they have a lot of However, if you aren't depending on |
The "Fetching https://k8s.io/kubernetes/pkg/kubectl" text indicates something in your dependency tree is requiring that repo |
@liggitt I missed that one sorry 🙃 |
@joshmsamuels You might or might not need a main.go. Frequently modules-related problems can be recreated without any
|
main.go
|
@liggitt So is there a way to use kubectl in my project? Its been working as expected for the last 2 months |
If you want to consume k8s.io/kubernetes as a module, you'd probably need to add require directives for matching versions of all of the subcomponents, rather than using go get |
Long-term (next few months), the plan is to publish kubectl in its own repo you could depend on as a normal module |
I tried the way you suggested in other issues but go get was overriding the versions I pinned |
https://github.com/kubernetes/kubectl/tree/master/pkg/util exists today, and there are a slew of PRs migrating (this is more kubernetes, than go discussion at this point though) |
@nikhita Thanks! I still want a temp solution at the very least. Youre right about it being more of a kubernetes discussion so maybe we should move this over to kubernetes/kubernetes#79384 |
Closing in favor of kubernetes/kubernetes#79384 |
According to golang/go#32776 (comment), it's not supposed to be used as a dependency. Additionally, I think this code might end up being removed if we agree with golang/go#32776 (comment). Closes eksctl-io#1537
According to golang/go#32776 (comment), it's not supposed to be used as a dependency. Additionally, I think this code might end up being removed if we agree with eksctl-io#2197 (comment). Closes eksctl-io#1537
According to golang/go#32776 (comment), it's not supposed to be used as a dependency. Additionally, I think this code might end up being removed if we agree with eksctl-io#2197 (comment). Closes eksctl-io#1537
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I am not sure (I am 1 patch version away from the latest release)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go get ./...
in the project rootWhat did you expect to see?
I expected to see a list of all my dependencies being downloaded successfully
What did you see instead?
go get ./...
go get -v ./...
The text was updated successfully, but these errors were encountered: