Skip to content

Request project-required Go versions above the supported range - #22447

Draft
jketema with Copilot wants to merge 6 commits into
mainfrom
copilot/update-go-build-environment-resolver
Draft

Request project-required Go versions above the supported range#22447
jketema with Copilot wants to merge 6 commits into
mainfrom
copilot/update-go-build-environment-resolver

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

The Go build-environment resolver could retain an older toolchain when go.mod required a version above maxGoVersion, guaranteeing failure under GOTOOLCHAIN=local.

  • Resolution

    • Request the go.mod version when Go is absent or older than the project requirement.
    • Request nothing when the installed version already satisfies the requirement.
    • Keep maxGoVersion as the extractor’s declared and tested support boundary.
  • Diagnostics and coverage

    • Clarify that an above-boundary project version is being requested without implying extractor support.
    • Cover missing, older, equal, and newer installed toolchains.
    • Update the affected integration expectation.

For example, with Go 1.27 installed and go.mod requiring 1.28, resolution now returns:

{ "go": { "version": "1.28" } }

This may provision a Go version newer than the extractor’s tested support boundary, trading that compatibility risk for satisfying the project’s hard minimum and avoiding guaranteed build failure.

Copilot AI and others added 2 commits August 27, 2026 15:06
Co-authored-by: jketema <93738568+jketema@users.noreply.github.com>
Co-authored-by: jketema <93738568+jketema@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Go build-environment resolver for version handling Request project-required Go versions above the supported range Aug 27, 2026
Copilot AI requested a review from jketema August 27, 2026 15:13
Co-authored-by: jketema <93738568+jketema@users.noreply.github.com>
Co-authored-by: jketema <93738568+jketema@users.noreply.github.com>
Co-authored-by: jketema <93738568+jketema@users.noreply.github.com>
@github-actions github-actions Bot added the Go label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants