Repository navigation
chore: bump Go to 1.27.1 - #30288
chore: bump Go to 1.27.1#30288ibetitsmike wants to merge 4 commits into
Conversation
Update go.mod, mise.toml, and flake.nix to Go 1.27.1. - go.mod: for modules on go 1.27, go mod tidy merges all require blocks into one direct and one indirect block. Module versions are unchanged except for the tailscale fork. - Point the tailscale.com replace at coder/tailscale#133, which drops the runtime.nanotime1 linkname that Go 1.27 refuses to link. - Pin paralleltestctx to coder/paralleltestctx#5. v0.0.2's x/tools cannot load Go 1.27 packages. The pinned commit also includes the unreleased check for outer variables reassigned in parallel subtests, which flags two tests fixed here. - flake.nix: use go_1_27 and buildGo127Module from a newer nixpkgs-unstable, update vendorHash, build the same paralleltestctx commit, and take golangci-lint from unstable (v2.14.0) instead of the pinned v1.55.2, which cannot read the v2 config. - Reformat three files for Go 1.27 gofmt, which no longer indents composite literals that follow the first value of a multi-value return. - Fix a %d verb with a *int argument that Go 1.27 vet reports, and update an httpapi test for the new encoding/json error text.
Go 1.27 enables the jsonv2 experiment by default, which makes json.RawMessage an alias of jsontext.Value. swag cannot resolve the alias, so it rendered RawMessage fields as an empty object and dropped every property of CreateTestAuditLogRequest. Override the type to the byte-slice schema swag generated before.
|
@codex review
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70905be463
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Bump the Go toolchain from 1.26.5 to 1.26.9 ([released 2026-10-02](https://go.dev/doc/devel/release#go1.26.9)). Tracked in Linear: [ENT-210](https://linear.app/codercom/issue/ENT-210/ironbank-critical-bump-go-to-1269-fix-by-2026-10-29). Iron Bank fix-by date for the Critical finding is **2026-10-29**. Go 1.26.9 includes fixes for the findings Iron Bank reported against `coder/coder-enterprise/coder-service-2:2.38.0`. Of the 19 still-valid advisories, 12 are only fixed in 1.26.9, including the Critical one: - Critical: [GO-2026-6612](https://pkg.go.dev/vuln/GO-2026-6612) / CVE-2026-78663 (HTTP/2 server double flow-control refund) - High: GO-2026-6603, -6605, -6607, -6608, -6609, -6610, -6611, -6613 - Low: GO-2026-6599, -6600, -6617 The other 7 (GO-2026-5026, -5942, -6088, -6089, -6090 High; -6091, -6218 Medium) are fixed since 1.26.6. The full list with links is in ENT-210. ## Changes Same file set as #27157: - `go.mod`: `go 1.26.5` to `go 1.26.9` - `mise.toml` / `mise.lock`: Go toolchain pin and the archive URLs and SHA-256 checksums for each platform (taken from the official `go.dev/dl` release list) ## Verification - `go build ./enterprise/cmd/coder` with go1.26.9 succeeds; `go mod tidy -diff` is clean. - `govulncheck -mode binary` on the resulting binary reports none of the 19 advisories above. The same scan of the released 2.38.0 binary (go1.26.5) reports all 19. ## Not in this PR `golang.org/x/net` v0.60.0 (the module-side half of GO-2026-6603, -6610, -6611, -6612 and -6617) is already on `main` via #30772 and is backported to the release branches in #30814 (2.38), #30815 (2.37), #30816 (2.36), #30817 (2.35) and #30818 (2.34), tracked in [ENT-211](https://linear.app/codercom/issue/ENT-211/ironbank-critical-bump-golangorgxnet-to-v0600-on-release-branches-fix). The Go 1.27.1 bump (#30288) stays a separate, larger change. Go backports: #30808 (2.38), #30809 (2.37), #30810 (2.36), #30813 (2.35), #30811 (2.34). Opened by Superblink on behalf of @droopy4096.
…ures (#31039) #31011 fixed a flake where a closure in `TestProjectSkillQueries` used the parent test's `testutil.Context` from parallel subtests. Once that deadline passed, the closure's `require.NoError` called `FailNow` on the parent `t`, which panics and takes down the whole `coderd/database` package. `paralleltestctx` only checked direct references to the context, so it missed this. coder/paralleltestctx#6 now follows calls to local closures too. This pins `paralleltestctx` to the current `main` commit, as there's no tag yet. That commit also brings in the outer variable reassignment check from coder/paralleltestctx#4 and the `x/tools` bump from coder/paralleltestctx#5. The closure check flagged the `loadPrompt` helper in `TestMediaToolResultRoundTrip`, so it now makes its own context from the subtest's `t`. The `TestGraph` and `TestRuntimeAudit` fixes for the outer variable check are the same as in #30288, so that PR only needs to repin.
Warning
Do not merge yet. Go 1.27.1 has net/http regressions (golang/go#81411 and three related fixes) that are fixed on
release-branch.go1.27but not released. Before merging:tailscale.comreplace to the merged commit.mise.toml,mise.lock, andflake.nix.Bumps Go from 1.26.5 to 1.27.1 in
go.mod,mise.toml, andflake.nix.Stack context: top layer of the Go 1.27 upgrade. The layers below bump golangci-lint to v2.14.0 (v2.0.2 cannot load Go 1.27 export data) and fix an aibridge response body leak that Go 1.27.1 exposes.
go.mod: for modules ongo 1.27,go mod tidymerges allrequireblocks into one direct and one indirect block, which accounts for most of the diff. No module versions change except the tailscale fork.tailscale.comreplace points at tstime/mono: remove unsafe linkname (Go 1.27 support) tailscale#133, which drops theruntime.nanotime1linkname that Go 1.27 refuses to link.paralleltestctxis pinned to the chore: bump golang.org/x/tools to v0.50.0 paralleltestctx#5 commit, because v0.0.2's x/tools cannot load Go 1.27 packages. That commit also carries an unreleased check for outer variables reassigned in parallel subtests, which flags two tests fixed here.flake.nix:go_1_27andbuildGo127Modulefrom a newernixpkgs-unstable, a newvendorHash, the sameparalleltestctxcommit, and the dev shell now takes golangci-lint from unstable (v2.14.0, built with Go 1.27.1) instead of the pinned v1.55.2, which cannot read our v2 config.json.RawMessagebecomes an alias ofjsontext.Value, which swag cannot resolve. A.swaggooverride keeps the generated API docs byte-identical.return, which reformats three files.%dwith a*intargument in the tailnet integration test, andencoding/jsonerrors now name the struct field, which changes onehttpapitest expectation.Testing
mainpackage builds;enterprise/cmd/codercross-compiles for darwin, windows, and linux arm64/arm.go vet ./...reports only two existing copylocks findings that Go 1.26.5 also reports.make pre-commitpasses with golangci-lint v2.14.0 and the pinnedparalleltestctx, both built with Go 1.27.1.make teston Go 1.27.1: the only Go 1.27 specific failures were thehttpapiexpectation and the aibridge goleak, both fixed in this stack. The other failures under load also fail on Go 1.26.5.go_1_27is 1.27.1, the Go module derivation matchesvendorHash, and a sandboxed build ofenterprise/cmd/codersucceeds. Every dev shell input builds, includingsqlc,paralleltestctx, and golangci-lint 2.14.0, except google-chrome, whose download from the nixos-25.05 input fails the same way onmain. The full.#defaultpackage fails at its frontend pnpm step, also the same way onmain.Review
cligoleak on idlepersistConngoroutines intest-go-pg (macos-latest)also failed four unrelated PRs on Go 1.26.5 the same day, and a localcligoroutine leak also reproduces on the Go 1.26.5 layer.