Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.25.1#1387
Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.25.1#1387yangspirit wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
@yangspirit: The label(s) DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yangspirit The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request updates the Makefile to enforce the use of go1.24.0 via the GOTOOLCHAIN environment variable for unit and sanity tests. Feedback suggests centralizing this version definition at the top of the file to avoid duplication and ensuring that the go mod tidy command also utilizes the specific toolchain to maintain consistency across the build process.
…nimum to go1.25.1+auto This avoids hardcoding a specific Go version, allowing Go to auto-upgrade to newer versions (e.g. Go 1.26) in the future as required by go.mod/dependencies, while still guaranteeing Go will never download the buggy Go 1.25.0 minimal toolchain.
|
/retest |
|
/test ci/unit-test |
|
@yangspirit: The specified target(s) for
Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/test all |
This prevents Go from auto-downloading the buggy Go 1.25.0 minimal toolchain in Prow, which contains a packaging bug where the 'covdata' tool is missing, causing '-cover' test builds to fail with 'go: no such tool "covdata"'.
Locking it to go1.25.1 (a bug-free patch release of Go 1.25) ensures Go compiles safely, while satisfying the Go >= 1.25.0 requirements pulled by transitive dependencies during sanity tests.
What type of PR is this?
What this PR does / why we need it:
This PR fixes presubmit unit test build failures and sanity test failures by explicitly setting GOTOOLCHAIN=go1.25.1 in the Makefile.
Recently, the gcs-fuse-csi-unit presubmit job began failing with go: no such tool "covdata" when using -cover. Under GOTOOLCHAIN=auto, Go auto-downloaded a minimal version of go1.25.0 which suffered from a known packaging bug omitting the covdata tool.
Furthermore, running go mod tidy in sanity-test targets retrieves dependencies requiring Go >= 1.25.0. By explicitly locking GOTOOLCHAIN=go1.25.1 (a bug-free patch release of Go 1.25), we solve both problems: satisfying the Go 1.25 requirement while bypassing the packaging bug in Go 1.25.0.
Which issue(s) this PR fixes:
Fixes #
Fixes Prow presubmit unit test failures (Build ID: 2057610651404079104)
Special notes for your reviewer:
Validated the fix inside the exact Prow CI container (gcr.io/gke-test-infra/kubekins-e2e:latest-master) where the tests now compile, download go1.24.0 as expected, and pass all tests successfully.
Does this PR introduce a user-facing change?: