CI: Add GOTOOLCHAIN=local to prevent automatic toolchain downloads #14957
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Q Workflow Optimization Report
Context
This PR addresses issue #14951, which reported CI failures related to Go toolchain download attempts. The CI Failure Doctor workflow identified that the runner could not download
golang.org/toolchaindue to network restrictions or availability issues.Root Cause
The go.mod file specifies
go 1.25.0, which triggers Go's automatic toolchain management. When the exact Go version isn't available locally, Go attempts to download it fromgolang.org/toolchain. In CI environments, this can fail due to:Changes Made
Added
GOTOOLCHAIN: localenvironment variable to 9 Go-based CI jobs in.github/workflows/ci.yml:Jobs Updated
test- Main unit test suiteintegration- Integration test matrixbuild- Binary build and validationlint-go- Go linting with golangci-lintfuzz- Fuzz testing (main branch only)security-scan- Security scanning (main branch only)mcp-server-compile-test- MCP server compilation validationcross-platform-build- macOS and Windows buildsalpine-container-test- Alpine Linux container testingHow It Works
Setting
GOTOOLCHAIN=localinstructs Go to use the locally installed toolchain version (fromactions/setup-go@v6) instead of attempting to download a newer version. This:Expected Impact
Before
After
Validation
env: GOTOOLCHAIN: localReferences
GOTOOLCHAIN=localdisables automatic downloadsTesting Strategy
CI will automatically validate these changes:
Note: This is a targeted fix that addresses the specific CI failure without changing test behavior or Go version requirements. The workflow will continue to use the Go version specified in go.mod, but will rely on the version installed by
actions/setup-go@v6instead of attempting downloads.Original prompt
This section details on the original issue you should resolve
<issue_title>[q] CI: Add GOTOOLCHAIN=local to prevent automatic toolchain downloads</issue_title>
<issue_description># Q Workflow Optimization Report
Context
This PR addresses issue #14951, which reported CI failures related to Go toolchain download attempts. The CI Failure Doctor workflow identified that the runner could not download
golang.org/toolchaindue to network restrictions or availability issues.Root Cause
The go.mod file specifies
go 1.25.0, which triggers Go's automatic toolchain management. When the exact Go version isn't available locally, Go attempts to download it fromgolang.org/toolchain. In CI environments, this can fail due to:Changes Made
Added
GOTOOLCHAIN: localenvironment variable to 9 Go-based CI jobs:Jobs Updated
test- Main unit test suiteintegration- Integration test matrixbuild- Binary build and validationlint-go- Go linting with golangci-lintfuzz- Fuzz testing (main branch only)security-scan- Security scanning (main branch only)mcp-server-compile-test- MCP server compilation validationcross-platform-build- macOS and Windows buildsalpine-container-test- Alpine Linux container testingHow It Works
Setting
GOTOOLCHAIN=localinstructs Go to use the locally installed toolchain version (fromactions/setup-go@v6) instead of attempting to download a newer version. This:Expected Impact
Before
Validation
env: GOTOOLCHAIN: localReferences
GOTOOLCHAIN=localdisables automatic downloadsTesting Strategy
CI will automatically validate these changes:
Note: This is a targeted fix that addresses the specific CI failure without changing test behavior or Go version requirements. The workflow will continue to use the Go version specified in go.mod, but will rely on the version installed by
actions/setup-go@v6instead of attempting downloads.To apply the patch locally:
Show patch preview (118 of 118 lines)