You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
latest / master
What environment is this in?:
docker and localhost
What did you expect to happen?:
I expect master to build :)
What happened instead?:
Build on a fresh clone fails with cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/...
How to reproduce it (as minimally and precisely as possible):
# Please use fresh clone
❯ git clone [email protected]:kubernetes/autoscaler.git
❯ cd autoscaler/cluster-autoscaler
❯ make build-arch-amd64
rm -f cluster-autoscaler-amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cluster-autoscaler-amd64 --ldflags "-s"
processors/provreq/provisioning_request_injector.go:25:2: cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/autoscaling.x-k8s.io/v1beta1: import lookup disabled by -mod=vendor
(Go version in go.mod is at least 1.14 and vendor directory exists.)
provisioningrequest/provreqclient/client.go:28:2: cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/client/clientset/versioned: import lookup disabled by -mod=vendor
(Go version in go.mod is at least 1.14 and vendor directory exists.)
provisioningrequest/provreqclient/testutils.go:28:2: cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/client/clientset/versioned/fake: import lookup disabled by -mod=vendor
(Go version in go.mod is at least 1.14 and vendor directory exists.)
provisioningrequest/provreqclient/client.go:29:2: cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/client/informers/externalversions: import lookup disabled by -mod=vendor
(Go version in go.mod is at least 1.14 and vendor directory exists.)
provisioningrequest/provreqclient/client.go:30:2: cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/client/listers/autoscaling.x-k8s.io/v1beta1: import lookup disabled by -mod=vendor
(Go version in go.mod is at least 1.14 and vendor directory exists.)
make: *** [Makefile:45: build-arch-amd64] Error 1
Executing make build-in-docker-arch-amd64 produces similar result.
Anything else we need to know?:
I'm pretty sure that most makefile tasks fail on a fresh clone.
Executing go mod vendor && make build-arch-amd64 succeeds.
First line of our .gitignore is cluster-autoscaler. The dependencies we're missing from vendor should be in vendor/k8s.io/autoscaler/cluster-autoscaler - so they're ignored by git. They don't show up in git status, which is why it seems that go mod vendor doesn't do anything. But the files are actually vendored after go mod vendor, which is why build starts passing locally after that, and persists.
Oh man thanks @towca for fixing my issue. We have a bunch of nonsense in our .gitignore, including build/. And we vendor our dependencies. And some vendored dependency had a build package.
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
latest / master
What environment is this in?:
docker and localhost
What did you expect to happen?:
I expect master to build :)
What happened instead?:
Build on a fresh clone fails with
cannot find module providing package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/...
How to reproduce it (as minimally and precisely as possible):
Executing
make build-in-docker-arch-amd64
produces similar result.Anything else we need to know?:
go mod vendor && make build-arch-amd64
succeeds.go mod vendor
was added to the command chain, but the problem affects all actions. I believe we could introduce a task executed before all others but I'm not sure if that's a correct way to go.The text was updated successfully, but these errors were encountered: