Proactively keep main and supported release branches on a currently-supported Go version
Background
Follow-up to #10762. Go officially supports only the latest 2 minor releases at any time (currently 1.26 and 1.27). Right now, the minimum go version in our go.mod files drifts passively — bumped as a side effect of dependency updates (e.g. a transitive sigstore bump silently pushed release-v1.12.x and release-v1.15.x from one Go version to another) rather than as a deliberate decision.
This was discussed in the working group on 2026-09-23: the decision was to be proactive instead — actively update go.mod's go directive on main and all supported release branches whenever a new Go minor version ships, rather than waiting for it to happen incidentally.
Proposal
- Cadence: on every Go minor release, with some acceptable drift (e.g. wait ~a month after a new Go version ships before bumping, to let the toolchain/ecosystem catch up).
- Scope:
main+ all currently supported release branches, bumped together in the same pass, to keep them consistent and make automation simpler (one trigger → N branches). - Automation: dependabot doesn't support bumping the
godirective itself, so we need our own mechanism — most likely a scheduled GitHub Action or a Tekton Task/Pipeline (dogfooding our own plumbing) that:- checks the latest supported Go versions,
- compares against
go.modon each supported branch, - opens a PR per branch when a bump is due.
- CI failures on bump: bumping the
godirective can changegofmtoutput, vet behavior, etc. and turn CI red (as happened onrelease-v1.12.x). Rather than trying to pre-fix everything, the automated PR description should clearly document what to do for likely failure modes (e.g. "ifgofmtfails, rungofmt -w <files>", "iflintfails, check X", etc.) so whoever picks up the PR can resolve it quickly. - Docs: this policy needs to be written down (not just tribal knowledge from a WG meeting) — likely in our release/support policy docs, alongside the "2 supported Go versions" statement.
- Tie to upstream Go support window: consider explicitly deriving "currently supported Go versions" from https://go.dev/dl/ (or go.dev's release policy) rather than hardcoding, so this stays correct without manual upkeep.
Out of scope
Guardrails against dependency updates silently changing the effective go directive (the original trigger for #10762) — we've decided we no longer care about that specific problem now that we're proactively managing the Go version directly; it's a separate concern if it comes up again.
Open questions
- GitHub Action vs. Tekton Task/Pipeline for the automation — any preference / existing precedent in the repo to follow?
- Where exactly should the "N-2 Go versions" policy be documented so it's discoverable?
/kind feature
Source: tektoncd/pipeline