-
Notifications
You must be signed in to change notification settings - Fork 4.8k
update Makefile to set GO11MODULE=off and generate test/extended #24869
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
Conversation
Makefile
Outdated
| .PHONY: build-tests | ||
|
|
||
| build-extended-test: | ||
| go generate ./test/extended/ |
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.
This is covered by hack/update-generated-bindata.sh, you should be calling that. And we generally don't call update bindata automatically.
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.
it took me more than a few minutes to figure out the 'test not found' panic after adding a new test/extended/file. I didn't see any documentation in the test/extended/README about generating test/extended/util/annotate/generated/zz_generated.annotations.go. I can add that documentation instead, 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 know it's also in hack/update-generated-bindata.sh, but that script also fails unless I add
export GO111MODULE=off , I also added to that script
Makefile
Outdated
|
|
||
| export GOFLAGS | ||
| export TESTFLAGS | ||
| export GO111MODULE=off |
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.
What's the reason for this? Go 1.14?
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.
go 1.13 has GO111MODULE=on by default AFAIK. Build fails unless you set GO111MODULE=off
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.
Then it should go into the library helper for build to set that (same place we set up go env) - hack/lib/util/golang.sh
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.
ok, updated
75c4d33 to
93898df
Compare
hack/update-generated-bindata.sh
Outdated
| STARTTIME=$(date +%s) | ||
| source "$(dirname "${BASH_SOURCE}")/lib/init.sh" | ||
|
|
||
| export GO111MODULE=off |
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.
go generate fails if it can't load modules? If i run the current script on a go 1.13 system it works - why would this be needed?
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.
$ go version
go version go1.14.1 linux/amd64
$ ./hack/update-generated-bindata.sh
go: finding module for package github.com/openshift/origin/test/extended/authorization
go: finding module for package github.com/openshift/origin/test/extended/apiserver
---
[ERROR] hack/update-generated-bindata.sh:6: `go generate ./test/extended` exited with status 1.93898df to
4ecede9
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sallyom The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sallyom: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Upon further review, I had a rogue |
Until/unless origin makes switch to gomod, need to set GO111MODULE=off in build scripts.