Skip to content

Commit

Permalink
internal/ci: use simpler "go get" to pull a version through the proxy
Browse files Browse the repository at this point in the history
Sometimes, proxy.golang.org flakes with a confusing error:

	server response: not found: cuelang.org/go/cmd/cue@v0.0.0-20230202153442-63749fe7d1fc:
		invalid version: missing cuelang.org/go/cmd/cue/go.mod at revision 63749fe

The error is not our fault, and it looks like some sort of race or
temporary problem on the proxy's side.

It is interesting that it tries to locate a go.mod file inside cmd/cue.
We only need to pull the module through the proxy, not a package,
so doing just that is simpler and may make this edge case failure
less likely to happen in practice.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I18759da21d45f25dc65049cac4c691ea0f9d38b0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549384
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
mvdan committed Feb 20, 2023
1 parent 7073554 commit eff0108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trybot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# avoid stopping too early. We also use a "failed" file as "go get" runs
# in a subshell via the pipe.
rm -f failed
if ! GOPROXY=https://proxy.golang.org go get cuelang.org/go/cmd/cue@$v; then
if ! GOPROXY=https://proxy.golang.org go get cuelang.org/go@$v; then
touch failed
fi |& tee output.txt
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ trybot: _base.#bashWorkflow & {
# avoid stopping too early. We also use a "failed" file as "go get" runs
# in a subshell via the pipe.
rm -f failed
if ! GOPROXY=https://proxy.golang.org go get cuelang.org/go/cmd/cue@$v; then
if ! GOPROXY=https://proxy.golang.org go get cuelang.org/go@$v; then
touch failed
fi |& tee output.txt
Expand Down

0 comments on commit eff0108

Please sign in to comment.