Repository navigation
fix(release): honor declared Go toolchain - #2435
Merged
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Ah, my bad. I didn't realize we needed auto set. Once you accept the CLA I'll be able to merge the PR. |
rksharma-owg
marked this pull request as ready for review
September 1, 2026 21:39
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2435 +/- ##
=======================================
Coverage 58.01% 58.01%
=======================================
Files 167 167
Lines 11596 11596
=======================================
Hits 6727 6727
Misses 4068 4068
Partials 801 801 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Subserial
approved these changes
Sep 2, 2026
1 task
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
crane 0.22.1 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * Reject non-canonical IP literals in all SSRF guards by @shaggyinsomniac in google/go-containerregistry#2426 * daemon: fix stale docker/docker reference in WithClient docs by @BobDu in google/go-containerregistry#2428 * build(deps): bump the go-deps group across 2 directories with 4 updates by @dependabot[bot] in google/go-containerregistry#2422 * authn: do not overwrite AuthConfig.Auth when username and password are empty by @nileshpatil6 in google/go-containerregistry#2420 * build(deps): bump the actions group across 1 directory with 8 updates by @dependabot[bot] in google/go-containerregistry#2423 * Support pulling images by sha512 digest by @BobDu in google/go-containerregistry#2427 * Allow empty label and annotation values in crane mutate by @theadsingh in google/go-containerregistry#2418 * fix(build): Use dependencies.gitSource in cloudbuild_v2.yaml by @tprussak in google/go-containerregistry#2434 * validate: support index attestation manifests and empty configs by @Subserial in google/go-containerregistry#2414 * name: improve error when parsing a reference with a URL scheme by @locker95 in google/go-containerregistry#2431 * fix(build): install binaries to /ko-app and add to PATH (#2424) by @tprussak in google/go-containerregistry#2436 * fix(release): honor declared Go toolchain by @rksharma-owg in google/go-containerregistry#2435 * remote: apply checkRedirectSSRF to writer-side HTTP clients by @locker95 in google/go-containerregistry#2432 * flatten: preserve config and layer media types when flattening by @Subserial in google/go-containerregistry#2438 * fix(mutate): make Time layer updates lazy by @amarkdotdev in google/go-containerregistry#2429 * build(deps): bump the go-deps group across 2 directories with 3 updates by @dependabot[bot] in google/go-containerregistry#2439 * remote: copy manifest annotations to referrers fallback tag descriptors by @codysoyland in google/go-containerregistry#2441 ## New Contributors * @shaggyinsomniac made their first contribution in google/go-containerregistry#2426 * @BobDu made their first contribution in google/go-containerregistry#2428 * @nileshpatil6 made their first contribution in google/go-containerregistry#2420 * @theadsingh made their first contribution in google/go-containerregistry#2418 * @locker95 made their first contribution in google/go-containerregistry#2431 * @rksharma-owg made their first contribution in google/go-containerregistry#2435 * @codysoyland made their first contribution in google/go-containerregistry#2441 **Full Changelog**: https://github.com/google/go-containerregistry/compare/v0.22.0...v0.22.1</pre> <p>View the full release notes at <a href="https://github.com/google/go-containerregistry/releases/tag/v0.22.1">https://github.com/google/go-containerregistry/releases/tag/v0.22.1</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!18250
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
go.modgo 1.25.0as the module's minimum supported versionProblem
The v0.22.0 release binaries were built with Go 1.25.0 even though the module declares
toolchain go1.26.6. This leaves release artifacts on an older standard library than intended and makes the repository's documented release-toolchain setting ineffective.Root cause
#2416 replaced the dedicated
.go-versionfile with thetoolchaindirective, but the release workflow retainedGOTOOLCHAIN: local.actions/setup-goselects thegodirective fromgo.mod(the minimum version), whileGOTOOLCHAIN: localprevents the Go command from activating the newer declared toolchain.Fix
Set
GOTOOLCHAINtoautofor the release job so the Go command honors the pinned toolchain directive. Before GoReleaser runs, comparego env GOVERSIONwith the toolchain parsed bygo mod edit -jsonand fail with an actionable mismatch if they differ.Security considerations
This affects the trusted tag-release workflow and the provenance-bearing binaries it publishes. The change does not alter workflow permissions, token handling, or application runtime behavior. Automatic selection is still pinned to the exact toolchain in
go.mod, and the new check prevents a mismatched builder from publishing. Existing v0.22.0 artifacts are not changed; the fix applies to future releases.Validation
go version -m cranefrom the v0.22.0 Linux x86_64 archive reportsgo1.25.0.expected=go1.26.6 actual=go1.26.5with the workflow'sGOTOOLCHAIN=localbehavior.workflow_GOTOOLCHAIN=auto expected=go1.26.6 actual=go1.26.6.CGO_ENABLED=0 go build -trimpath ./cmd/crane/main.go;go version -mreportsgo1.26.6.PATH="$(go env GOPATH)/bin:$PATH" ./hack/presubmit.sh— passed.go test -coverprofile=/tmp/gcr-coverage-2430.txt -covermode=atomic -race ./...— passed.go build ./... && go test -run=^$ ./...— passed.actionlint -ignore SC2086 .github/workflows/release.yml— passed. (SC2086findings predate this change elsewhere in the workflow.)git diff --check— passed.Compatibility
No library API, CLI behavior, module minimum Go version, artifact format, or supported platform changes. Only the Go version used to build future release binaries changes to the already-declared release toolchain.
Fixes #2430