-
Notifications
You must be signed in to change notification settings - Fork 18k
x/build/cmd/coordinator: some subrepos want to run tests in both module and GOPATH modes #30233
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
Labels
Builders
x/build issues (builders, bots, dashboards)
FeatureRequest
Issues asking for a new feature that does not need a proposal.
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
Comments
I see two ways this can be implemented:
|
Change https://golang.org/cl/194277 mentions this issue: |
gopherbot
pushed a commit
to golang/build
that referenced
this issue
Sep 11, 2019
It will be necessary to know whether the current environment and configuration has resulted in module mode or GOPATH mode being selected. Do this dynamically by invoking 'go env GOMOD', since the outcome depends on the version of Go and its default GO111MODULE behavior, as well as whether a go.mod file is added to the subrepo, and what environment overrides were applied by coordinator via the BuildConfig.ModulesEnv method. This requires the repository being tested to be available on disk, so move the step of fetching it to happen earlier. For now, this change only detects and logs the build mode. Future changes will use this information further. Updates golang/go#34190 Updates golang/go#32528 Updates golang/go#30233 Change-Id: I641becaaae5b6cfad22961d8864a877241e61cd3 Reviewed-on: https://go-review.googlesource.com/c/build/+/194277 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
codebien
pushed a commit
to codebien/build
that referenced
this issue
Nov 13, 2019
It will be necessary to know whether the current environment and configuration has resulted in module mode or GOPATH mode being selected. Do this dynamically by invoking 'go env GOMOD', since the outcome depends on the version of Go and its default GO111MODULE behavior, as well as whether a go.mod file is added to the subrepo, and what environment overrides were applied by coordinator via the BuildConfig.ModulesEnv method. This requires the repository being tested to be available on disk, so move the step of fetching it to happen earlier. For now, this change only detects and logs the build mode. Future changes will use this information further. Updates golang/go#34190 Updates golang/go#32528 Updates golang/go#30233 Change-Id: I641becaaae5b6cfad22961d8864a877241e61cd3 Reviewed-on: https://go-review.googlesource.com/c/build/+/194277 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
It turned out we had sufficient coverage so none of the subrepos needed this, Closing in favor of #48875. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Builders
x/build issues (builders, bots, dashboards)
FeatureRequest
Issues asking for a new feature that does not need a proposal.
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Testing
An issue that has been verified to require only test changes, not just a test failure.
coordinator already had support for running tests (at least trybots) in module mode, it's used for
oauth2
andbuild
subrepos:https://github.com/golang/build/blob/34b995b40b0d31f2760a2f57b9ce74e17925702c/cmd/coordinator/coordinator.go#L2506-L2507
Some subrepos, such as x/tools, may want to soon start running their tests in both
GO111MODULE=on
andGO111MODULE=off
modes, in order to make sure there are no regressions in either mode.We should add support for this to the coordinator.
/cc @bradfitz @matloob
The text was updated successfully, but these errors were encountered: