From 3c2e92d207c949b9d3d90b26d16a113daf3e24f4 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Mon, 11 May 2026 13:01:10 +1000 Subject: [PATCH] ci(e2e-ddil): install gotestsum from prebuilt tarball `go install gotest.tools/gotestsum@v1.12.0` failed on the self-hosted runner because v1.12.0 pulls golang.org/x/tools v0.19.0, whose tokeninternal static-assert pegs a narrow Go window (~1.22). Both older and newer runner Go versions trip `invalid array length -delta * delta`. A prebuilt linux_amd64 binary sidesteps toolchain coupling entirely without changing the gotestsum version pin. --- .github/workflows/e2e-ddil.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-ddil.yml b/.github/workflows/e2e-ddil.yml index 93b0089fd..244e7ea36 100644 --- a/.github/workflows/e2e-ddil.yml +++ b/.github/workflows/e2e-ddil.yml @@ -54,11 +54,24 @@ jobs: path: mulga - name: Install gotestsum + env: + GOTESTSUM_VERSION: "1.12.0" run: | - # Idempotent: re-running `go install` on a cached binary is a no-op. - # Pinned tag keeps Actions output format stable across runs. - go install gotest.tools/gotestsum@v1.12.0 - echo "${HOME}/go/bin" >> "${GITHUB_PATH}" + # Prebuilt tarball, not `go install`: gotestsum v1.12.0 pulls + # x/tools v0.19.0 whose tokeninternal static-assert pegs a + # narrow Go window (~1.22). The self-hosted runner's Go falls + # outside that window, so source-install fails with + # `invalid array length -delta * delta`. A prebuilt binary + # sidesteps toolchain coupling entirely. + BIN_DIR="${RUNNER_TEMP}/gotestsum-bin" + mkdir -p "${BIN_DIR}" + if [ ! -x "${BIN_DIR}/gotestsum" ]; then + curl -fsSL \ + "https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_linux_amd64.tar.gz" \ + | tar -xz -C "${BIN_DIR}" gotestsum + fi + echo "${BIN_DIR}" >> "${GITHUB_PATH}" + "${BIN_DIR}/gotestsum" --version - name: Build Install Artifacts working-directory: mulga/scripts/tofu-cluster