Skip to content

Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.25.1#1387

Open
yangspirit wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
yangspirit:fix_timeout
Open

Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.25.1#1387
yangspirit wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
yangspirit:fix_timeout

Conversation

@yangspirit
Copy link
Copy Markdown
Member

@yangspirit yangspirit commented May 22, 2026

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?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

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?:

None

@google-oss-prow
Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow
Copy link
Copy Markdown

@yangspirit: The label(s) kind/failing-test cannot be applied, because the repository doesn't have them.

Details

In response to this:

This prevents Go from auto-downloading 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.24.0 (which matches the go.mod baseline) ensures Go compiles safely and avoids the bug, even on runners that only have an older Go version.

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Recently, the gcs-fuse-csi-unit presubmit job began failing. Under GOTOOLCHAIN=auto (default toolchain behavior), Go auto-downloaded the Go 1.25.0 toolchain inside the Prow container. The downloaded minimal toolchain for Go 1.25.0 contains a packaging bug where the auxiliary covdata tool is missing. Consequently, when compiling packages for coverage with the -cover flag, Go failed with go: no such tool "covdata".

Specifying GOTOOLCHAIN=go1.24.0 (matching the project's baseline version in go.mod) forces Go to pull a stable, fully-featured Go 1.24.0 toolchain, ensuring the tests build and pass successfully without pulling the bug-ridden Go 1.25.0 toolchain.

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?:

None

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.

@yangspirit yangspirit marked this pull request as ready for review May 22, 2026 01:44
@google-oss-prow
Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread Makefile Outdated
Comment thread Makefile Outdated
@yangspirit yangspirit changed the title Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.24.0 Fix unit-test Prow failure by locking GOTOOLCHAIN to go1.25.1 May 22, 2026
…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.
@yangspirit
Copy link
Copy Markdown
Member Author

/retest

@yangspirit
Copy link
Copy Markdown
Member Author

/test ci/unit-test

@google-oss-prow
Copy link
Copy Markdown

@yangspirit: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-gcs-fuse-csi-driver-e2e-test

Use /test all to run all jobs.

Details

In response to this:

/test ci/unit-test

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.

@yangspirit
Copy link
Copy Markdown
Member Author

/test all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant