Skip to content

tests: resolve setup-go to 'stable' instead of a stale >=1.17.0 floor - #22

Open
parker-chung wants to merge 1 commit into
mason-org:v1from
parker-chung:fix/setup-go-check-latest
Open

parker-chung wants to merge 1 commit into
mason-org:v1from
parker-chung:fix/setup-go-check-latest

Conversation

@parker-chung

Copy link
Copy Markdown

Was looking into why mason-registry#17478 (bump gopls to v0.24.0) was stuck
and dug into the CI logs. The failure boils down to this:

go: golang.org/x/tools/gopls@v0.24.0: golang.org/x/tools/gopls@v0.24.0 requires go >= 1.27.0 (running go 1.26.7; GOTOOLCHAIN=local)

setup-go is pinned to go-version: ">=1.17.0" here, which is satisfied by
whatever Go version is already cached on the runner, so it never looks for
anything newer. setup-go also forces GOTOOLCHAIN=local, so go install can't
quietly upgrade itself at that point either. Once a package's go.mod
requires a newer minimum than whatever happens to be cached, install just
fails.

darwin_x64 passed in that PR's run only because its runner image happened to
already have something >=1.27 cached — not because of any real platform
difference.

Switching to go-version: 'stable' always resolves against the current
stable Go release instead of a floor nobody's actually relying on anymore.

Heads up: this does mean these jobs will occasionally download a fresh Go
toolchain instead of hitting the runner's cache, so they'll be a bit slower
on the days a new Go version lands. Seemed like a reasonable trade-off
against silently failing on any package that bumps its minimum Go version.

setup-go was pinned to go-version >=1.17.0, which nobody actually needs
anymore. Since it's satisfied by whatever's cached on the runner, it
never checks for anything newer, and setup-go also forces
GOTOOLCHAIN=local, so a package can't self-upgrade either. Using
'stable' always resolves to the current stable Go release instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant