Skip to content

Go: separate max supported Go version from the Go version to install#21456

Open
owen-mc wants to merge 3 commits intogithub:mainfrom
owen-mc:go/max-supported-version
Open

Go: separate max supported Go version from the Go version to install#21456
owen-mc wants to merge 3 commits intogithub:mainfrom
owen-mc:go/max-supported-version

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Mar 11, 2026

This allows us to update the max supported Go version after testing with a release candidate, but before the new version has been released. In particular, it will mean that we can merge a PR allowing us to tolerate the new version before it is released, which removes the urgency from merging the PRs to fully support and use the new version as soon as it is released.

@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Mar 11, 2026
@github-actions github-actions bot added the Go label Mar 11, 2026
@owen-mc owen-mc requested a review from mbg March 11, 2026 16:24
@owen-mc owen-mc marked this pull request as ready for review March 13, 2026 09:33
@owen-mc owen-mc requested review from a team as code owners March 13, 2026 09:33
Copilot AI review requested due to automatic review settings March 13, 2026 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR separates the maximum supported Go version from the Go version the autobuilder will actually install, enabling early updates to the supported-range ceiling (e.g., based on RC testing) without requiring the new Go release to exist yet.

Changes:

  • Introduces goVersionToInstall alongside maxGoVersion to distinguish “supported” vs “installable (released)” Go versions.
  • Updates autobuilder version-selection diagnostics and behavior to request goVersionToInstall in several “best effort” paths.
  • Adds a small test asserting goVersionToInstall is not newer than maxGoVersion and updates expectations in existing version-selection tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
go/extractor/autobuilder/build-environment.go Adds goVersionToInstall and updates selection logic/diagnostic messages to install the released maximum rather than the supported maximum.
go/extractor/autobuilder/build-environment_test.go Adjusts expectations to goVersionToInstall and adds a guard test for version ordering.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 119 to +128
@@ -119,8 +124,8 @@ func getVersionWhenGoModVersionTooHigh(v versionInfo) (msg string, version util.
") is above the supported range (" + minGoVersion.String() + "-" + maxGoVersion.String() +
"). The version of Go installed in the environment (" + v.goEnvVersion.String() +
") is below the maximum supported version (" + maxGoVersion.String() +
"). Requesting the maximum supported version of Go (" + maxGoVersion.String() + ")."
version = maxGoVersion
"). Requesting the maximum supported version of Go that has been released (" + goVersionToInstall.String() + ")."
version = goVersionToInstall
if goVersionToInstall.IsNewerThan(maxGoVersion) {
t.Errorf("goVersionToInstall (%s) should not be newer than maxGoVersion (%s).", goVersionToInstall, maxGoVersion)
}
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Go no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants