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

cmd/go: difficulty resolving 'error loading module requirements' with kubernetes #32864

Closed
medyagh opened this issue Jul 1, 2019 · 7 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@medyagh
Copy link

medyagh commented Jul 1, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes, I am using latest.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
$ go version
go version go1.12.6 darwin/amd64
medya@minikube$ git version
git version 2.22.0
medya@minikube$ 
medya@minikube$ 
medya@minikube$ code .
medya@minikube$ go version
go version go1.12.6 darwin/amd64
medya@minikube$ 
medya@minikube$ 
medya@minikube$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/medya/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/medya/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.6/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/medya/workspace/minikube/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qz/4lyjr8t50y3g8wv63wx8l69800h78j/T/go-build519087717=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

in minikube go.mod I bumped k8s.io/kubernetes v1.11.3 to k8s.io/kubernetes v1.15.0

and I ran go mod tidy -v

What did you expect to see?

I expected it update my dependency or tell me what is blocking it form doing so.

What did you see instead?

go: error loading module requirements

$ go mod tidy -v
Fetching https://k8s.io/kube-controller-manager?go-get=1
Fetching https://k8s.io/metrics?go-get=1
Fetching https://k8s.io/apiextensions-apiserver?go-get=1
Fetching https://k8s.io/apimachinery?go-get=1
Fetching https://k8s.io/cli-runtime?go-get=1
Fetching https://k8s.io/component-base?go-get=1
Fetching https://k8s.io/api?go-get=1
Fetching https://k8s.io/code-generator?go-get=1
Fetching https://k8s.io/kube-proxy?go-get=1
Fetching https://k8s.io/csi-translation-lib?go-get=1
Parsing meta tags from https://k8s.io/csi-translation-lib?go-get=1 (status code 200)
get "k8s.io/csi-translation-lib": found meta tag get.metaImport{Prefix:"k8s.io/csi-translation-lib", VCS:"git", RepoRoot:"https://github.com/kubernetes/csi-translation-lib"} at https://k8s.io/csi-translation-lib?go-get=1
Parsing meta tags from https://k8s.io/metrics?go-get=1 (status code 200)
get "k8s.io/metrics": found meta tag get.metaImport{Prefix:"k8s.io/metrics", VCS:"git", RepoRoot:"https://github.com/kubernetes/metrics"} at https://k8s.io/metrics?go-get=1
go: finding k8s.io/csi-translation-lib v0.0.0
go: finding k8s.io/metrics v0.0.0
Parsing meta tags from https://k8s.io/code-generator?go-get=1 (status code 200)
get "k8s.io/code-generator": found meta tag get.metaImport{Prefix:"k8s.io/code-generator", VCS:"git", RepoRoot:"https://github.com/kubernetes/code-generator"} at https://k8s.io/code-generator?go-get=1
Parsing meta tags from https://k8s.io/apimachinery?go-get=1 (status code 200)
get "k8s.io/apimachinery": found meta tag get.metaImport{Prefix:"k8s.io/apimachinery", VCS:"git", RepoRoot:"https://github.com/kubernetes/apimachinery"} at https://k8s.io/apimachinery?go-get=1
Parsing meta tags from https://k8s.io/kube-proxy?go-get=1 (status code 200)
Parsing meta tags from https://k8s.io/api?go-get=1 (status code 200)
get "k8s.io/kube-proxy": found meta tag get.metaImport{Prefix:"k8s.io/kube-proxy", VCS:"git", RepoRoot:"https://github.com/kubernetes/kube-proxy"} at https://k8s.io/kube-proxy?go-get=1
get "k8s.io/api": found meta tag get.metaImport{Prefix:"k8s.io/api", VCS:"git", RepoRoot:"https://github.com/kubernetes/api"} at https://k8s.io/api?go-get=1
go: finding k8s.io/code-generator v0.0.0
Parsing meta tags from https://k8s.io/cli-runtime?go-get=1 (status code 200)
get "k8s.io/cli-runtime": found meta tag get.metaImport{Prefix:"k8s.io/cli-runtime", VCS:"git", RepoRoot:"https://github.com/kubernetes/cli-runtime"} at https://k8s.io/cli-runtime?go-get=1
go: finding k8s.io/apimachinery v0.0.0
go: finding k8s.io/kube-proxy v0.0.0
Parsing meta tags from https://k8s.io/kube-controller-manager?go-get=1 (status code 200)
get "k8s.io/kube-controller-manager": found meta tag get.metaImport{Prefix:"k8s.io/kube-controller-manager", VCS:"git", RepoRoot:"https://github.com/kubernetes/kube-controller-manager"} at https://k8s.io/kube-controller-manager?go-get=1
Parsing meta tags from https://k8s.io/apiextensions-apiserver?go-get=1 (status code 200)
get "k8s.io/apiextensions-apiserver": found meta tag get.metaImport{Prefix:"k8s.io/apiextensions-apiserver", VCS:"git", RepoRoot:"https://github.com/kubernetes/apiextensions-apiserver"} at https://k8s.io/apiextensions-apiserver?go-get=1
Parsing meta tags from https://k8s.io/component-base?go-get=1 (status code 200)
get "k8s.io/component-base": found meta tag get.metaImport{Prefix:"k8s.io/component-base", VCS:"git", RepoRoot:"https://github.com/kubernetes/component-base"} at https://k8s.io/component-base?go-get=1
go: finding k8s.io/api v0.0.0
go: finding k8s.io/kube-controller-manager v0.0.0
go: finding k8s.io/cli-runtime v0.0.0
go: finding k8s.io/apiextensions-apiserver v0.0.0
go: finding k8s.io/component-base v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
Fetching https://k8s.io/kube-aggregator?go-get=1
go: k8s.io/[email protected]: unknown revision v0.0.0
Fetching https://k8s.io/sample-apiserver?go-get=1
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
Fetching https://k8s.io/apiserver?go-get=1
go: k8s.io/[email protected]: unknown revision v0.0.0
Fetching https://k8s.io/cloud-provider?go-get=1
Fetching https://k8s.io/kube-scheduler?go-get=1
Fetching https://k8s.io/client-go?go-get=1
Fetching https://k8s.io/kubelet?go-get=1
Fetching https://k8s.io/legacy-cloud-providers?go-get=1
go: k8s.io/[email protected]: unknown revision v0.0.0
Fetching https://k8s.io/cri-api?go-get=1
Parsing meta tags from https://k8s.io/kube-aggregator?go-get=1 (status code 200)
get "k8s.io/kube-aggregator": found meta tag get.metaImport{Prefix:"k8s.io/kube-aggregator", VCS:"git", RepoRoot:"https://github.com/kubernetes/kube-aggregator"} at https://k8s.io/kube-aggregator?go-get=1
go: k8s.io/[email protected]: unknown revision v0.0.0
go: finding k8s.io/kube-aggregator v0.0.0
Fetching https://k8s.io/cluster-bootstrap?go-get=1
Parsing meta tags from https://k8s.io/sample-apiserver?go-get=1 (status code 200)
get "k8s.io/sample-apiserver": found meta tag get.metaImport{Prefix:"k8s.io/sample-apiserver", VCS:"git", RepoRoot:"https://github.com/kubernetes/sample-apiserver"} at https://k8s.io/sample-apiserver?go-get=1
go: finding k8s.io/sample-apiserver v0.0.0
Parsing meta tags from https://k8s.io/apiserver?go-get=1 (status code 200)
get "k8s.io/apiserver": found meta tag get.metaImport{Prefix:"k8s.io/apiserver", VCS:"git", RepoRoot:"https://github.com/kubernetes/apiserver"} at https://k8s.io/apiserver?go-get=1
Parsing meta tags from https://k8s.io/cloud-provider?go-get=1 (status code 200)
get "k8s.io/cloud-provider": found meta tag get.metaImport{Prefix:"k8s.io/cloud-provider", VCS:"git", RepoRoot:"https://github.com/kubernetes/cloud-provider"} at https://k8s.io/cloud-provider?go-get=1
go: finding k8s.io/cloud-provider v0.0.0
Parsing meta tags from https://k8s.io/kube-scheduler?go-get=1 (status code 200)
get "k8s.io/kube-scheduler": found meta tag get.metaImport{Prefix:"k8s.io/kube-scheduler", VCS:"git", RepoRoot:"https://github.com/kubernetes/kube-scheduler"} at https://k8s.io/kube-scheduler?go-get=1
go: finding k8s.io/apiserver v0.0.0
Parsing meta tags from https://k8s.io/client-go?go-get=1 (status code 200)
get "k8s.io/client-go": found meta tag get.metaImport{Prefix:"k8s.io/client-go", VCS:"git", RepoRoot:"https://github.com/kubernetes/client-go"} at https://k8s.io/client-go?go-get=1
Parsing meta tags from https://k8s.io/kubelet?go-get=1 (status code 200)
get "k8s.io/kubelet": found meta tag get.metaImport{Prefix:"k8s.io/kubelet", VCS:"git", RepoRoot:"https://github.com/kubernetes/kubelet"} at https://k8s.io/kubelet?go-get=1
Parsing meta tags from https://k8s.io/legacy-cloud-providers?go-get=1 (status code 200)
get "k8s.io/legacy-cloud-providers": found meta tag get.metaImport{Prefix:"k8s.io/legacy-cloud-providers", VCS:"git", RepoRoot:"https://github.com/kubernetes/legacy-cloud-providers"} at https://k8s.io/legacy-cloud-providers?go-get=1
Parsing meta tags from https://k8s.io/cri-api?go-get=1 (status code 200)
get "k8s.io/cri-api": found meta tag get.metaImport{Prefix:"k8s.io/cri-api", VCS:"git", RepoRoot:"https://github.com/kubernetes/cri-api"} at https://k8s.io/cri-api?go-get=1
go: finding k8s.io/kube-scheduler v0.0.0
go: finding k8s.io/client-go v0.0.0
Parsing meta tags from https://k8s.io/cluster-bootstrap?go-get=1 (status code 200)
get "k8s.io/cluster-bootstrap": found meta tag get.metaImport{Prefix:"k8s.io/cluster-bootstrap", VCS:"git", RepoRoot:"https://github.com/kubernetes/cluster-bootstrap"} at https://k8s.io/cluster-bootstrap?go-get=1
go: finding k8s.io/kubelet v0.0.0
go: finding k8s.io/legacy-cloud-providers v0.0.0
go: finding k8s.io/cri-api v0.0.0
go: finding k8s.io/cluster-bootstrap v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: error loading module requirements

The failing go.mod

module k8s.io/minikube

go 1.12

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Parallels/docker-machine-parallels v1.3.0
github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2 // indirect
github.com/blang/semver v3.5.0+incompatible
github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9 // indirect
github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 // indirect
github.com/cpuguy83/go-md2man v1.0.4 // indirect
github.com/docker/docker v1.13.1 // indirect
github.com/docker/go-units v0.0.0-20170127094116-9e638d38cf69
github.com/docker/machine v0.16.1
github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f
github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 // indirect
github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e // indirect
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/glog v0.0.0-20141105023935-44145f04b68c
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/go-cmp v0.2.0
github.com/google/go-containerregistry v0.0.0-20190318164241-019cdfc6adf9
github.com/google/go-github/v25 v25.0.2
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 // indirect
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d // indirect
github.com/gorilla/mux v1.7.1 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect
github.com/hashicorp/go-multierror v0.0.0-20160811015721-8c5f0ad93604 // indirect
github.com/hashicorp/go-retryablehttp v0.5.4
github.com/hashicorp/go-version v1.1.0 // indirect
github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880 // indirect
github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1 // indirect
github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 // indirect
github.com/hooklift/iso9660 v0.0.0-20170318115843-1cf07e5970d8
github.com/imdario/mergo v0.0.0-20141206190957-6633656539c1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6 // indirect
github.com/jimmidyson/go-download v0.0.0-20161028105827-7f9a90c8c95b
github.com/johanneswuerbach/nfsexports v0.0.0-20181204082207-1aa528dcb345
github.com/json-iterator/go v1.1.5 // indirect
github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/libvirt/libvirt-go v3.4.0+incompatible
github.com/machine-drivers/docker-machine-driver-vmware v0.1.1
github.com/magiconair/properties v0.0.0-20160816085511-61b492c03cf4 // indirect
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.5
github.com/mattn/go-runewidth v0.0.0-20161012013512-737072b4e32b // indirect
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936
github.com/mitchellh/mapstructure v0.0.0-20170307201123-53818660ed49 // indirect
github.com/moby/hyperkit v0.0.0-20171020124204-a12cd7250bcd
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/olekukonko/tablewriter v0.0.0-20160923125401-bdcc175572fd
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/pborman/uuid v0.0.0-20150603214016-ca53cad383ca
github.com/pelletier/go-buffruneio v0.1.0 // indirect
github.com/pelletier/go-toml v0.0.0-20160822122712-0049ab3dc4c4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/browser v0.0.0-20160118053552-9302be274faa
github.com/pkg/errors v0.8.0
github.com/pkg/profile v0.0.0-20161223203901-3a8809bd8a80
github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6 // indirect
github.com/pmezard/go-difflib v1.0.0
github.com/r2d4/external-storage v0.0.0-20171222174501-8c0e8605dc7b
github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5 // indirect
github.com/samalba/dockerclient v0.0.0-20160414174713-91d7393ff859 // indirect
github.com/shurcooL/sanitized_anchor_name v0.0.0-20151028001915-10ef21a441db // indirect
github.com/sirupsen/logrus v1.4.1 // indirect
github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97 // indirect
github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a // indirect
github.com/spf13/cobra v0.0.0-20180228053838-6644d46b81fa
github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80 // indirect
github.com/spf13/pflag v1.0.1
github.com/spf13/viper v1.0.0
github.com/stretchr/testify v1.3.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20151027082146-e0fe6f683076 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20160623135812-c539bca196be
github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097
golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284
golang.org/x/oauth2 v0.0.0-20190115181402-5dab4167f31c
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b
golang.org/x/text v0.3.2
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d // indirect
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.6 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gopkg.in/inf.v0 v0.9.0 // indirect
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect
k8s.io/api v0.0.0-20180712090710-2d6f90ab1293
k8s.io/apimachinery v0.0.0-20180621070125-103fd098999d
k8s.io/apiserver v0.0.0-20180914001516-67c892841170 // indirect
k8s.io/client-go v0.0.0-20180806134042-1f13a808da65
k8s.io/kube-openapi v0.0.0-20180216212618-50ae88d24ede // indirect
k8s.io/kubernetes v1.15.0
)

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Jul 1, 2019

See #32776 and kubernetes/kubernetes#79384

Specifically this comment #32776 (comment)

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

@medyagh
Copy link
Author

medyagh commented Jul 1, 2019

Thanks for the response @AlexRouSg . I understand that I would need to add all the indirect modules myself but the error message on go mod tidy was not even remotely helping me. Or others that might have same issue.

I was hoping by adding -v I could get some more details. Is there any way go mod could provide more context or more helpful error message?

@medyagh
Copy link
Author

medyagh commented Jul 1, 2019

Plus I had the same issue when I was trying to use the sub package. ( Either client-go or kubectl)
I was able to solve my problem with go dep . I was hoping go mod could catch up with go dep

@AlexRouSg
Copy link
Contributor

The error message is actually:

go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: k8s.io/[email protected]: unknown revision v0.0.0
go: error loading module requirements

The unknown revision v0.0.0 parts are the hints on what's wrong. Do you have any suggestions on what would be a better message?

@bcmills bcmills changed the title go mod vague error: go: error loading module requirements cmd/go: difficulty resolving 'error loading module requirements' with kubernetes Jul 1, 2019
@bcmills bcmills added modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 1, 2019
@bcmills bcmills added this to the Unplanned milestone Jul 1, 2019
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 1, 2019
@medyagh
Copy link
Author

medyagh commented Jul 1, 2019

The unknown revision v0.0.0 parts are the hints on what's wrong. Do you have any suggestions on what would be a better message?

Two things:

  • in my go.mod file I have the commit ID for them for example (1f13a808da65) for k8s.io/client-go v0.0.0-20180806134042-1f13a808da65, so I don't undrestand why go mod thinks it has not been given a revision ?

  • and more importantly, if I revert back the k8s.io/kubernetes v1.15.0 version from 1.15.0 to 1.11.3 , it will not be yelling about unknown revision for any of them (including client-go) and worked fine...so it is inconsistent error and it failed to undrestand that the source of the problem is k8s.io/kubernetes v1.15.0 everything else is fine.

so I don't think it is unknown revision since i have given the commit id to it.

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Jul 1, 2019

1.11.3 was before they added modules support so things just work the old way.

In their go.mod file they have a bunch of k8s.io/* v0.0.0 lines which indeed there is no v0.0.0 tag. They then use the replace directive which only work for building kubernetes but not for other packages/programs depending on it. Thus in my very first post I quote you those related issues explaining the exact situation you are in. I suggest you read them in its entirety to see the entire discussion on the topic.

The errors are from trying to resolve kubernetes' dependencies, so it doesn't matter that your go.mod file has proper require lines.

@medyagh
Copy link
Author

medyagh commented Jul 1, 2019

ok thank you for the explaining.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants