From eff01087f42d12b501fe4341228db5d413afae59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 2 Feb 2023 16:18:32 +0000 Subject: [PATCH] internal/ci: use simpler "go get" to pull a version through the proxy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 63749fe7d1fc 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í Change-Id: I18759da21d45f25dc65049cac4c691ea0f9d38b0 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549384 Unity-Result: CUEcueckoo TryBot-Result: CUEcueckoo Reviewed-by: Paul Jolly --- .github/workflows/trybot.yml | 2 +- internal/ci/github/trybot.cue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trybot.yml b/.github/workflows/trybot.yml index 09f15a5986b..c5e78b38fbc 100644 --- a/.github/workflows/trybot.yml +++ b/.github/workflows/trybot.yml @@ -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 diff --git a/internal/ci/github/trybot.cue b/internal/ci/github/trybot.cue index 1bd45147b4a..8e7865accbc 100644 --- a/internal/ci/github/trybot.cue +++ b/internal/ci/github/trybot.cue @@ -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