Skip to content

Conversation

@sallyom
Copy link
Contributor

@sallyom sallyom commented Apr 13, 2020

Until/unless origin makes switch to gomod, need to set GO111MODULE=off in build scripts.

Makefile Outdated
.PHONY: build-tests

build-extended-test:
go generate ./test/extended/
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@sallyom sallyom Apr 13, 2020

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
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, updated

@sallyom sallyom force-pushed the update-build-tests branch from 75c4d33 to 93898df Compare April 13, 2020 21:16
STARTTIME=$(date +%s)
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

export GO111MODULE=off
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@sallyom sallyom force-pushed the update-build-tests branch from 93898df to 4ecede9 Compare April 14, 2020 13:24
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sallyom
To complete the pull request process, please assign bparees
You can assign the PR to them by writing /assign @bparees in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

@sallyom: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-fips 4ecede9 link /test e2e-aws-fips
ci/prow/e2e-gcp 4ecede9 link /test e2e-gcp

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.

Details

Instructions 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.

@sallyom
Copy link
Contributor Author

sallyom commented Apr 14, 2020

Upon further review, I had a rogue go.mod file in my home dir that was causing go to always run with go mod on. After deleting this rogue go.mod, go properly detects there is no go.mod and does the right thing. Closing this.

@sallyom sallyom closed this Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants