Repository navigation
go: 1.26.8 -> 1.27.1 (unblocks croc GHSA-x89h fix, #750) - #758
Conversation
Unblocks croc 11.5.3 (#750, GHSA-x89h): croc 11.5.2 and 11.5.3 both declare `go 1.27.0` in go.mod, and our GOTOOLCHAIN=local build refuses ("go.mod requires go >= 1.27.0 (running go 1.26.8)"), so the fix release cannot build on 1.26. Checksums come from go.dev's official release manifest (https://go.dev/dl/?mode=json): go1.27.1.linux-amd64.tar.gz 63d339f0...90168445 70,553,950 bytes go1.27.1.src.tar.gz 4e408aba...2ab238b1 35,109,201 bytes No hex0 re-root: Go 1.N bootstraps from Go 1.M where M = N-2 rounded down to even (src/cmd/dist/build.go:480, go1.27.1), so 1.27 needs 1.24.x, which is what the arm64 bedrock root (go1.24.9) already provides. The arm64 Source block is untouched. Blast radius: 50 packages build with go and will rebuild. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: gominimal/pkgs/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe Go recipe updates to version 1.27.1 and its matching source archive digest. The Trivy build adds a Go 1.27 JSON compatibility patch, applies it, and checks for remaining Go 1.26-only patterns. ChangesGo 1.27 build updates
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The Go update and Trivy compatibility patch have no established merge-blocking issue. Complete the intended minimal build before merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…ErrUnsupported)
With go 1.27.1, trivy v0.74.0 was the only one of the 50 Go packages that
failed, on both arches:
pkg/x/json/json.go:109:16: undefined: json.SkipFunc
Go 1.27's encoding/json/v2 dropped `json.SkipFunc`; the "fall back to default
decoding" sentinel is now `errors.ErrUnsupported`. Upstream fixed this on main
in dc3c56eed5 (#11127), but it is not in any release yet.
Backported: only the pkg/x/json/json.go hunk (+3/-1, verified to apply
cleanly to v0.74.0's file). The rest of that upstream commit is CI/lint/test
churn and a style-only errors.AsType move. The patch is applied by name, and
build.sh checks that it landed. Drop at the next trivy release.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
First build on 1.27.1: 49 of 50 Go packages built fine. The exception was trivy (v0.74.0), on both arches: |
…e->embed) The first cut took only pkg/x/json/json.go. CI then failed at pkg/iac/scanners/cloudformation/parser/parameter.go:57 (undefined: json.SkipFunc), the second call site, which upstream's same commit fixes. Both are now included, plus pkg/result/filter.go's struct tag `json:",inline"` -> `json:",embed"`. That one still COMPILES on 1.27 but would silently change the shape of trivy's JSON output. Verified against the full v0.74.0 source: those are the only SkipFunc uses and the only `,inline` JSON tag, and the patch applies cleanly to all three files. The build.sh check now fails if ANY SkipFunc/`,inline` survives in non-test Go source, using a single grep whose exit status is portable. The old `| grep -v` form tripped on the PATCHED tree under ugrep. Negative control (unpatched tree trips, patched tree passes) run under both ugrep and BSD grep. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With Go 1.27.1, otelcol-contrib failed on both arches inside a transitive dep:
cockroachdb/swiss@v0.0.0-20251224182025-b0f6560f979b/map.go:
undefined: hashFn, getRuntimeHasher, fastrand64
swiss reaches runtime internals via go:linkname shims gated per Go version.
The resolved commit ("Enable Go 1.26 support") compiles them out on 1.27.
Upstream aa852fb3c14e (2026-08-20, "Enable go 1.27 support") adds 1.27.
Pinned through the manifest's existing `replaces:` block before ocb runs,
with checks that the section exists and the pin landed. Validated against
v0.159.0's manifest: one substitution, 4 replaces entries, the obi/ebpf/avro
entries untouched. An unused replace is inert, so this is safe to keep until
a collector release carries the newer swiss.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
/build |
- packages/go/build.ncl: keep main's hex0-bootstrapped, source-built shape (#667); bump it to 1.27.1 with the 1.27.1 source sha256 (verified against go.dev's published checksum and by hashing the tarball). The branch's prebuilt amd64 url/sha is obsolete under #667. - packages/otel-collector/build.sh: take main's Go-1.27 swiss pin; drop the branch's duplicate (main's guard exits if swiss is already pinned). - packages/trivy/build.sh (semantic conflict git didn't flag): keep this branch's upstream json/v2 patch (trivy dc3c56eed5, also handles json:",inline") and drop #667's sed SkipFunc bridge, which deliberately exits 1 when no json.SkipFunc is left, i.e. after the patch has run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
croc >= 11.5.2 declares go 1.27.0; this branch last built against go 1.26 and failed. Main is now on go 1.27.0 (hex0-bootstrapped, #667), so the bump no longer waits on #758. No conflicts; vs main the branch still changes only packages/croc/build.ncl. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Why now
It unblocks the croc security fix (#750, GHSA-x89h). croc 11.5.2 (the fix release) and 11.5.3 both declare
go 1.27.0ingo.mod, and our build usesGOTOOLCHAIN=local, so #750'sminimal buildfails on both arches:A no-op re-run can't fix that. Patching croc's
go.moddown would mean guessing whether it uses 1.27 APIs, and letting it download a toolchain would break offline builds. Bumping Go is the honest path.Checksums
From go.dev's official release manifest (
https://go.dev/dl/?mode=json):No hex0 re-root needed (a minor bump, so checked)
Go's rule, from
src/cmd/dist/build.go:480at go1.27.1: Go 1.N bootstraps from Go 1.M, "where M is N-2 rounded down to an even number". For 1.27 that's 1.24, enforced bynotgo124.go. The arm64 leg's bedrock root isgo1.24.9(the hex0 ladder), so itsSourceblock is untouched. The diff is 3 lines:versionplus the two checksums.Blast radius
50 packages build with
goand will rebuild:act, age, bun, caddy, chezmoi, cloud-sql-proxy, cloudflared, cosign, crane, croc, dive, duf, esbuild, fq, fzf, gh, git-lfs, gitleaks, glow, go-swagger, golangci-lint, goose, govulncheck, grpcurl, grype, helm, jqfmt, k9s, kubectl, lazydocker, lazygit, mermaid-ascii, minimal-sshd, mkcert, nats-cli, nats-server, otel-collector, podman-remote, pulumi, restic, scrt, skopeo, sops, spire, syft, tailscale, terraform, trivy, vhs, yq.
A Go minor release can surface new
vetor compile errors in dependents, sominimal buildon this PR is the real verification.After this merges
I'll update #750 (croc) from main, and its build should go green.
🤖 Generated with Claude Code
Summary by CodeRabbit