-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
2b07ea3
to
6695f7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is odd. Despite -mod=vendor
, make test
ends up downloading some stuff:
GOOS=linux GO111MODULE=on GOFLAGS=-mod=vendor go test -run none ./pkg/... ./test/e2e
? github.com/intel/pmem-csi/pkg/coverage [no test files]
? github.com/intel/pmem-csi/pkg/ndctl [no test files]
? github.com/intel/pmem-csi/pkg/pmem-common [no test files]
? github.com/intel/pmem-csi/pkg/pmem-csi-driver [no test files]
? github.com/intel/pmem-csi/pkg/pmem-device-manager [no test files]
? github.com/intel/pmem-csi/pkg/pmem-exec [no test files]
? github.com/intel/pmem-csi/pkg/pmem-grpc [no test files]
ok github.com/intel/pmem-csi/pkg/pmem-ns-init 0.011s [no tests to run]
? github.com/intel/pmem-csi/pkg/pmem-registry [no test files]
ok github.com/intel/pmem-csi/pkg/pmem-state 0.006s [no tests to run]
? github.com/intel/pmem-csi/pkg/pmem-vgm [no test files]
ok github.com/intel/pmem-csi/pkg/registryserver 0.012s [no tests to run]
ok github.com/intel/pmem-csi/test/e2e 0.035s [no tests to run]
go: downloading github.com/docker/go-units v0.4.0
go: downloading golang.org/x/net v0.0.0-20191027233614-53de4c7853b5
go: downloading k8s.io/utils v0.0.0-20190801114015-581e00157fb1
go: downloading k8s.io/klog v1.0.0
go: downloading google.golang.org/grpc v1.24.0
...
You can see that after rm -rf $GOPATH/pkg/mod
.
Some of your later commits are fixes for the previous ones. Please squash. It might have to be in a single commit.
These ad hoc package downloads are coming from
The same applies for |
That's okay. I just wanted to be sure that we are vendoring correctly (i.e. https://github.com/kubernetes-csi/csi-release-tools/blob/master/verify-vendor.sh
I found that downloading from github.com can be pretty slow, sometimes even slower than building from source. I'm just pointing that out as something that we need to check before deciding. But in this case the actual binaries seems to be hosted on AWS and getting them was fast for me, so this might be the best solution. I'd prefer to not add tool sources to our vendor dir if we can avoid it because it makes our BOM larger and harder to maintain. |
dbad5c4
to
5e78c5d
Compare
There's a new failure in the CI (https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/blue/organizations/jenkins/pmem-csi/detail/PR-461/8/pipeline):
|
I suspect due to change in |
@avalluri: are you working on that or shall I add that later? |
I will do that, part of this PR. |
100c547
to
66d91ba
Compare
test/test.make
Outdated
.PHONY: test_vendor_bom | ||
test: test_vendor_bom | ||
test_vendor_bom: | ||
@ if ! diff -c \ | ||
<(tail -n +2 vendor-bom.csv | sed -e 's/;.*//') \ | ||
<((grep '^ name =' Gopkg.lock | sed -e 's/.*"\(.*\)"/\1/') | LC_ALL=C LANG=C sort); then \ | ||
<(for path in $$(go list -f '{{.Path}}' -m all); do if [ -d "vendor/$$path" ]; then echo "$$path"; fi; done | LC_ALL=C LANG=C sort); then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started wondering whether we need $(GO)
(and thus GOFLAGS=-mod=vendor
) here instead of just go. Sure enough, using go
results in downloading packages (https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/blue/organizations/jenkins/pmem-csi/detail/PR-461/14/pipeline/51).
There's just one snag: with GOFLAGS=-mod=vendor
, some modules aren't listed anymore (for example, k8s.io/kubectl) even though we have that module in vendor
. This needs further investigation, don't merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised the question upstream: golang/go#35589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avalluri: please remove this commit and instead cherry-pick this one: pohly@43dfe7f
I switched to a different approach. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sound more promising than depending on go list
. I will cherry-pick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avalluri: please remove this commit and instead cherry-pick this one: pohly@43dfe7f
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer need to check out in GOPATH (https://github.com/intel/pmem-csi/blob/devel/README.md#get-source-code).
Please change that section. I suggest:
Get source code
PMEM-CSI uses Go modules and thus can be checked out and (if that should be desired) built anywhere in the filesystem. Pre-built container images are available and thus users don't need to build from source, but they will still need some additional files. To get the source code, use:
git clone https://github.com/intel/pmem-csi
Result of below set of commands: go mod init go get k8s.io/kubernetes@release-1.16 go get k8s.io/<k8s-family-projects>@kubernetes-1.16.2 go mod tidy go mod vendor The way package paths returned by v1.13 'go list' is different from previous go versions. Made changes to rest_runtime target according to this. TODO: We can drop Gopkg.lock file, but 'test_vendor_bom' make target uses this file to retrieve the package list to validate vendor tree. One should replace this check with go module equivalent.
We used to base the analysis on the modules imported by dep. With the switch to go mod vendoring we can no longer do that and it also wasn't quite complete: some of the imported modules embed code from elsewhere which sometimes has other licenses. Therefore we now look for license files and list anything that has a separate license.
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
…ource Building from source needs downloading of all dependent source packages, instead we download the release binaries. Change in Kustomize version resulted in changes to few generated deployment files.
This to fix build failure appeared in CI after recent govm update: ----- make start tar zxf _work/govm_0.9-alpha_Linux_amd64.tar.gz -C _work/bin/ PATH="/mnt/workspace/pmem-csi_PR-461/_work/bin:$PATH" test/start-kubernetes.sh get current user: user: Current requires cgo or $USER set in environment make: *** [test/start-stop.make:13: start] Error 1 -----
After recent govm update, observed that occasionally cluster creation fails due to ssh connection timeout, Hence increasing the timeout to 2min.
Good point. Done |
Added new commit that increases the ssh timeout while creating test cluster. |
@@ -78,7 +78,7 @@ case ${TEST_DISTRO} in | |||
;; | |||
esac | |||
|
|||
SSH_TIMEOUT=60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the cluster now comes up slower than before? That's worrisome, but not much that we can do about it. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my surprise, It was not observed in CI but on my dev machine, the failure was quite frequent.
A test failure in e2e tests, I suspect unrelated this change:
|
That is from recently merged volume leak test. |
actually, as this is just added Warning text and real operations did succeed, it is just question of filtering out warning text, no retry needed. |
We need to disable
|
Good idea! |
I am 😕. How come CI results are green. Clearly, there is one test failure. |
you mean one test in "production 1.15 Clear" failed? |
@pohly Is it good enough to merge. |
Ok, got it. Thanks. |
Set of changes to move to go-1.13 release and introducing go modules for dependency tracking. With this change we no more use 'dep' tool going forward.