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 fails with "unknown revision v0.0.0" #1197

Closed
hongshaoyang opened this issue Mar 9, 2021 · 5 comments · Fixed by #1198
Closed

go get fails with "unknown revision v0.0.0" #1197

hongshaoyang opened this issue Mar 9, 2021 · 5 comments · Fixed by #1198

Comments

@hongshaoyang
Copy link
Contributor

hongshaoyang commented Mar 9, 2021

Running go get with go modules enabled fails due to this error:

$ GOFLAGS="" GO111MODULE=on go get github.com/GoogleCloudPlatform/spark-on-k8s-operator                                    
go: github.com/GoogleCloudPlatform/spark-on-k8s-operator@v0.0.0-20210307184338-1947244ce5f4 requires
        k8s.io/apiextensions-apiserver@v0.0.0: reading k8s.io/apiextensions-apiserver/go.mod at revision v0.0.0: unknown revision v0.0.0

trying just the API package also gives the same error:

$ GOFLAGS="" GO111MODULE=on go get github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io/v1beta2 
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io/v1beta2 latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis latest
go get: github.com/GoogleCloudPlatform/spark-on-k8s-operator@v0.0.0-20210307184338-1947244ce5f4 requires
        k8s.io/apiextensions-apiserver@v0.0.0: reading k8s.io/apiextensions-apiserver/go.mod at revision v0.0.0: unknown revision v0.0.0
@yilun-zhu
Copy link

Hello, did you manage to find a solution in the end?
I'm getting something similar,

go get: github.com/GoogleCloudPlatform/spark-on-k8s-operator@none updating to
        github.com/GoogleCloudPlatform/spark-on-k8s-operator@v0.0.0-20210525214053-075e5383e467 requires
        k8s.io/kubernetes@v1.19.6 requires
        k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

@hongshaoyang
Copy link
Contributor Author

Hi @yilun-zhu

You might need to specify a different version of k8s.io/client-go, depending on the version of the Kubernetes server you run on.

See https://github.com/kubernetes/client-go/blob/master/INSTALL.md

@sairamankumar2
Copy link
Contributor

Hi @hongshaoyang
I was trying to create a validating webhook for sparkapplication and it fails in go mod tidy . I have updated the k8s.io/client-go to the version based on my Kubernetes server.

My go.mod looks like:

module example.com

go 1.15

require (
	github.com/onsi/ginkgo v1.14.1
	github.com/onsi/gomega v1.10.2
	k8s.io/api v0.20.4
	k8s.io/apimachinery v0.20.4
	k8s.io/client-go v0.20.4
	sigs.k8s.io/controller-runtime v0.7.2
	github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20210822172015-74ea1c86c9a5
)

go get cmd looks like:
go: github.com/GoogleCloudPlatform/spark-on-k8s-operator@v0.0.0-20210822172015-74ea1c86c9a5 requires k8s.io/kubernetes@v1.19.6 requires k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

Am I missing something in my go.mod?

@hongshaoyang
Copy link
Contributor Author

hi @sairamankumar2 ,

this is related to kubernetes/kubernetes#79384

@Ameralameri
Copy link

Proplm

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

Successfully merging a pull request may close this issue.

4 participants