From 2b9baffdcb33875f4be286922225cef2dc9a2185 Mon Sep 17 00:00:00 2001 From: Zach <3724288+zedkipp@users.noreply.github.com> Date: Fri, 27 Feb 2026 08:43:53 -0700 Subject: [PATCH] chore: update setup-go action to fix Go download failures (#22306) setup-go has been sporadically failing to download Go, and we were advised by a member of the Go team that downloading Go from `storage.googleapis.com` is not guaranteed (which is what setup-go <= v5.6.0 does). Also remove the use-preinstalled-go optimization for Windows runners. setup-go v6 sets GOTOOLCHAIN=local, which prevents the pre-installed Go from auto-downloading the toolchain specified in go.mod. The windows optimization with v5 relied on GOTOOLCHAIN=auto. setup-go uses the runner cache, which is a different caching path but should serve the same purpose. --- .github/actions/setup-go/action.yaml | 7 ++----- .github/workflows/ci.yaml | 4 ---- .github/workflows/nightly-gauntlet.yaml | 5 ----- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/actions/setup-go/action.yaml b/.github/actions/setup-go/action.yaml index 125d0a6ac6..495f1918c7 100644 --- a/.github/actions/setup-go/action.yaml +++ b/.github/actions/setup-go/action.yaml @@ -5,9 +5,6 @@ inputs: version: description: "The Go version to use." default: "1.25.7" - use-preinstalled-go: - description: "Whether to use preinstalled Go." - default: "false" use-cache: description: "Whether to use the cache." default: "true" @@ -15,9 +12,9 @@ runs: using: "composite" steps: - name: Setup Go - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: - go-version: ${{ inputs.use-preinstalled-go == 'false' && inputs.version || '' }} + go-version: ${{ inputs.version }} cache: ${{ inputs.use-cache }} - name: Install gotestsum diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4fc0c8dcbf..2b1679cb65 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -422,10 +422,6 @@ jobs: - name: Setup Go uses: ./.github/actions/setup-go with: - # Runners have Go baked-in and Go will automatically - # download the toolchain configured in go.mod, so we don't - # need to reinstall it. It's faster on Windows runners. - use-preinstalled-go: ${{ runner.os == 'Windows' }} use-cache: true - name: Setup Terraform diff --git a/.github/workflows/nightly-gauntlet.yaml b/.github/workflows/nightly-gauntlet.yaml index 2b099ecfb4..bd7ade8859 100644 --- a/.github/workflows/nightly-gauntlet.yaml +++ b/.github/workflows/nightly-gauntlet.yaml @@ -64,11 +64,6 @@ jobs: - name: Setup Go uses: ./.github/actions/setup-go - with: - # Runners have Go baked-in and Go will automatically - # download the toolchain configured in go.mod, so we don't - # need to reinstall it. It's faster on Windows runners. - use-preinstalled-go: ${{ runner.os == 'Windows' }} - name: Setup Terraform uses: ./.github/actions/setup-tf