k8snetworkplumbingwg / sriov-network-operator

Operator for provisioning and configuring SR-IOV CNI plugin and device plugin
Apache License 2.0
84 stars 114 forks source link

chore: remove vendor directory #739

Closed tobiasgiese closed 4 months ago

tobiasgiese commented 4 months ago

Switched to Go modules for dependency management. This simplifies our workflow and reduces repo size.

github-actions[bot] commented 4 months ago

Thanks for your PR, To run vendors CIs, Maintainers can use one of:

adrianchiris commented 4 months ago

/test-all

bn222 commented 4 months ago

if CI is green, I'm also on board with this

tobiasgiese commented 4 months ago

Having issues with controller-gen

go: gopkg.in/check.v1@v0.0.0-20161208181325-20d25e280405: missing go.sum entry for go.mod file

Added gopkg.in/check.v1 to hack/tools.go already but with no lock. Also the exact version is in the go.sum already.

tobiasgiese commented 4 months ago

@adrianchiris @bn222 FYI - had to add export GOPATH=$(shell go env GOPATH) to the Makefile, otherwise the GH runners downloaded all the deps to the repos go/. Also removed the obsolete vendor tests in https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/739/commits/f81700e08f2bc7b10161ada79bb2eccd120c9877

Edit: test k8s failed because of flakiness during cert-manager apply from remote

adrianchiris commented 4 months ago

/test-all

adrianchiris commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-all

zeeke commented 4 months ago

hi @tobiasgiese , end-to-end lanes are failing because of:

running tests
+ which ginkgo
which: no ginkgo in (/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator:/root/opr-k8s2-1/data/_tool/go/1.22.4/x64/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/bin:/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator/bin)
+ '[' 1 -ne 0 ']'
++ mktemp -d
+ GINKGO_TMP_DIR=/tmp/tmp.ADYS4SOl1B
+ cd /tmp/tmp.ADYS4SOl1B
+ go mod init tmp
go: creating new go.mod: module tmp
+ go install -mod=readonly github.com/onsi/ginkgo/v2/ginkgo@v2.9.5
go: go: module cache not found: neither GOMODCACHE nor GOPATH is set
+ rm -rf /tmp/tmp.ADYS4SOl1B
+ echo 'Downloading ginkgo tool'
Downloading ginkgo tool
+ cd -
/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator
+ GOPATH=/go
+ JUNIT_OUTPUT=/tmp/artifacts
+ export PATH=/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator:/root/opr-k8s2-1/data/_tool/go/1.22.4/x64/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/bin:/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator/bin:/go/bin
+ PATH=/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator:/root/opr-k8s2-1/data/_tool/go/1.22.4/x64/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/bin:/root/opr-k8s2-1/data/sriov-network-operator/sriov-network-operator/bin:/go/bin
+ ginkgo -output-dir=/tmp/artifacts --junit-report unit_report.xml -v ./test/validation -- -report=/tmp/artifacts
./hack/run-e2e-conformance.sh: line 21: ginkgo: command not found
failed, retrying
running tests

Would you mind adding the following changes (or anything similar) to this PR? https://github.com/k8snetworkplumbingwg/sriov-network-operator/commit/dabec260a703af6a08f52d58769b9fb56bd417f1

tobiasgiese commented 4 months ago

I think the issue is that the GH Actions runner has no real home directory. Also go env GOPATH is empty. Maybe the issue are the srirov runners?

tobiasgiese commented 4 months ago
❯ go env GOPATH
/Users/tgiese/go/
❯ echo $GOPATH
/Users/tgiese/go/
❯ unset GOPATH
❯ go env GOPATH
/Users/tgiese/go
❯ export HOME=
❯ go env GOPATH

❯

Seems like the issue is really the empty $HOME

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all was low on disk space, added 50G

tobiasgiese commented 4 months ago

/test-all

tobiasgiese commented 4 months ago

/test-e2e-nvidia-all

all tests are running now 👍🏻

adrianchiris commented 4 months ago

thanks for working on this one @tobiasgiese !! @zeeke PTAL, lets merge this one if you are happy with it.

adrianchiris commented 4 months ago

punching it ! 🚀