Skip to content

Conversation

@cardil
Copy link
Contributor

@cardil cardil commented Oct 14, 2025

Which issue(s) this PR fixes:

Related: knative/hack#436

What this PR does, why we need it:

Set the GOTOOLCHAIN environment variable to "auto" when running go install for dependencies.

This leverages the Go 1.21+ feature to automatically download and use the Go toolchain version specified in the dependency's go.mod file. This improves build reproducibility and simplifies environment setup by removing the need to have a specific Go version pre-installed.

This PR should prevent failures like this.

/kind bug

Set the `GOTOOLCHAIN` environment variable to "auto" when running `go install` for dependencies.

This leverages the Go 1.21+ feature to automatically download and use the Go toolchain version specified in the dependency's `go.mod` file. This improves build reproducibility and simplifies environment setup by removing the need to have a specific Go version pre-installed.
@knative-prow knative-prow bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 14, 2025
@knative-prow
Copy link

knative-prow bot commented Oct 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 14, 2025
@cardil cardil changed the title build: Set GOTOOLCHAIN=auto when installing dependencies magetasks: Set GOTOOLCHAIN=auto when installing Golang dependencies Oct 14, 2025
@cardil
Copy link
Contributor Author

cardil commented Oct 14, 2025

/assign @maschmid

@cardil
Copy link
Contributor Author

cardil commented Oct 14, 2025

/cc @maschmid

@knative-prow knative-prow bot requested a review from maschmid October 14, 2025 11:48
@maschmid
Copy link

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2025
@knative-prow knative-prow bot merged commit 7bd8399 into knative:main Oct 14, 2025
22 checks passed
@cardil cardil deleted the bugfix/mage-install-go-tools branch October 14, 2025 11:56
@cardil
Copy link
Contributor Author

cardil commented Oct 14, 2025

/cherrypick support/golang-1.22

@knative-prow-robot
Copy link
Contributor

@cardil: new pull request created: #41

Details

In response to this:

/cherrypick support/golang-1.22

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-sigs/prow repository.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants