Skip to content

chore: bump Go to 1.27.1 - #30288

Closed
ibetitsmike wants to merge 4 commits into
mike/aibridge-close-upstream-bodyfrom
mike/go-1.27
Closed

ibetitsmike wants to merge 4 commits into
mike/aibridge-close-upstream-bodyfrom
mike/go-1.27

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

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.27 but not released. Before merging:

  1. Move to Go 1.27.2 once it ships.
  2. Merge coder/tailscale#133 and repin the tailscale.com replace to the merged commit.
  3. Merge coder/paralleltestctx#5, tag a release, and repin it in mise.toml, mise.lock, and flake.nix.
  4. Rerun CI and the Nix checks.

Bumps Go from 1.26.5 to 1.27.1 in go.mod, mise.toml, and flake.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 on go 1.27, go mod tidy merges all require blocks into one direct and one indirect block, which accounts for most of the diff. No module versions change except the tailscale fork.
  • tailscale.com replace points at tstime/mono: remove unsafe linkname (Go 1.27 support) tailscale#133, which drops the runtime.nanotime1 linkname that Go 1.27 refuses to link.
  • paralleltestctx is 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_27 and buildGo127Module from a newer nixpkgs-unstable, a new vendorHash, the same paralleltestctx commit, 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.
  • Go 1.27 turns on the jsonv2 experiment by default, so json.RawMessage becomes an alias of jsontext.Value, which swag cannot resolve. A .swaggo override keeps the generated API docs byte-identical.
  • Go 1.27 gofmt no longer indents composite literals that follow the first value of a multi-value return, which reformats three files.
  • Go 1.27 vet reports a %d with a *int argument in the tailnet integration test, and encoding/json errors now name the struct field, which changes one httpapi test expectation.

Testing

  • Go 1.27.1: every main package builds; enterprise/cmd/coder cross-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-commit passes with golangci-lint v2.14.0 and the pinned paralleltestctx, both built with Go 1.27.1.
  • make test on Go 1.27.1: the only Go 1.27 specific failures were the httpapi expectation and the aibridge goleak, both fixed in this stack. The other failures under load also fail on Go 1.26.5.
  • Nix: the locked go_1_27 is 1.27.1, the Go module derivation matches vendorHash, and a sandboxed build of enterprise/cmd/coder succeeds. Every dev shell input builds, including sqlc, paralleltestctx, and golangci-lint 2.14.0, except google-chrome, whose download from the nixos-25.05 input fails the same way on main. The full .#default package fails at its frontend pnpm step, also the same way on main.

Review

  • Coder Agents UAT on an isolated dev deployment, with the server and agent built with Go 1.27.1. Round 1 passed on 833763d: tailnet ping, ssh, and a 50 MiB transfer, plus HTTP proxy and AI Bridge cancellation, with goroutines back to baseline. Round 2 passed on 5aaeb6f and covered the AI Bridge retry and failover fixes from fix(aibridge/intercept): close upstream response bodies in Responses interceptors #30287.
  • Codex: the P1 asking to wait for Go 1.27.2 is merge gate 1 above. The current head reviewed clean.
  • Flakes not caused by this bump: the cli goleak on idle persistConn goroutines in test-go-pg (macos-latest) also failed four unrelated PRs on Go 1.26.5 the same day, and a local cli goroutine leak also reproduces on the Go 1.26.5 layer.

Xum opened this PR on behalf of Mike.

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.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Requested by Xum on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T16:57:57.634375Z 5aaeb6f Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.mod Resolved
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Requested by Xum on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: b6a769743b

ℹ️ 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".

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Requested by Xum on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 5aaeb6f6d5

ℹ️ 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".

@linear-code

linear-code Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

CODAGT-1122

ENT-210

droopy4096 added a commit that referenced this pull request Oct 15, 2026
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.
ethanndickson added a commit that referenced this pull request Oct 20, 2026
…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.
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant