🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix: bump Go version from 1.26.4 to 1.26.5 (backport 2.34) - #27158

Merged
mtojek merged 5 commits into
release/2.34from
fix/go-1.26.5-backport-2.34
Jul 14, 2026
Merged

fix: bump Go version from 1.26.4 to 1.26.5 (backport 2.34)#27158
mtojek merged 5 commits into
release/2.34from
fix/go-1.26.5-backport-2.34

Conversation

@denisra

@denisra denisra commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport Go toolchain bump from 1.26.4 to 1.26.5 to release/2.34.

Go 1.26.5 (released 2026-07-07) includes security fixes to the crypto/tls and os packages, addressing:

These were flagged by the IronBank scan of coder/coder-enterprise/coder-service-2:2.34.5.

Main PR: #27157

Changes

  • go.mod: go 1.26.4 to go 1.26.5 (language version floor)
  • mise.toml / mise.lock: Go toolchain pin 1.26.4 to 1.26.5 (this is what actually compiles the scanned artifact)
  • .github/actions/setup-go/action.yaml: default Go version 1.26.4 to 1.26.5
  • scripts/should_deploy.sh: remove ~62 lines of unreachable dead code below an unconditional if/else that exits in both branches; cherry-picked from main to clear a shellcheck SC2317 warning on the Ubuntu 26.04 CI runner

Nix flake fix cherry-picks

Two commits were cherry-picked from main to fix the build_image (nix) CI job on release/2.34:

These are already on main and have been cherry-picked to release/2.34 (via the base branch merge). Local validation confirmed the nix build succeeds with these patches applied.

Note on should_deploy.sh

The should_deploy.sh cleanup is behavior-preserving. The existing if/else already exits with DEPLOY (main) or NOOP (any other branch) in both branches, making all code below it unreachable. The old release-branch deploy logic was already disabled by the short-circuit added earlier. This commit removes the dead code and was cherry-picked from main to fix a shellcheck SC2317 (unreachable code) warning that started failing on the Ubuntu 26.04 runner.

Linear: ENT-130

@denisra
denisra force-pushed the fix/go-1.26.5-backport-2.34 branch 2 times, most recently from 8a85481 to d577a68 Compare July 13, 2026 08:57
Go 1.26.5 (released 2026-07-07) includes security fixes to the
crypto/tls and os packages, addressing CVE-2026-39822 and
CVE-2026-42505 flagged by IronBank scans.

Ref: ENT-130
@denisra
denisra force-pushed the fix/go-1.26.5-backport-2.34 branch from d577a68 to b863f88 Compare July 13, 2026 09:17
@linear-code

linear-code Bot commented Jul 13, 2026

Copy link
Copy Markdown

ENT-130

Shellcheck ≥0.9.0 (Ubuntu 26.04) flags the dead code after the
if/else block as SC2317. Both branches called exit 0, making
everything after line 32 unreachable.

Cherry-pick the clean version from main that simply prints
DEPLOY/NOOP without the dead code.
@denisra

denisra commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

CI Update

build_image (26.04): Fixed in 4527417. The failure was SC2317 (unreachable code) in scripts/should_deploy.sh — shellcheck ≥0.9.0 on Ubuntu 26.04 catches dead code after the if/else block where both branches call exit 0. Replaced with the clean version from main.

build_image (nix): Pre-existing failure, not caused by this PR. This PR does not touch flake.nix or flake.lock. The root cause is that flake.lock pins nixpkgs-unstable at rev 0182a361 (Feb 17 2026) which only packages Go 1.26.0. The sqlc-custom overlay uses buildGo126Module which gets Go 1.26.0, but coder/sqlc's go.mod requires toolchain go1.26.2, triggering a toolchain download that fails in the nix sandbox. The same stale pin exists on main, but main's dogfood workflow matrix is ["22.04", "26.04"] (no nix entry), so it never hits this. A nix flake update nixpkgs-unstable is needed separately to fix this.

@denisra

denisra commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-07-13 13:20 UTC by @denisra
Spend: $8.92 / $100.00

Review history
  • R1 (2026-07-13): 10 reviewers, 1 P2, COMMENT. Review

deep-review v0.9.0 | Round 1 | db643c8..4527417

Last posted: Round 1, 1 findings (1 P2), COMMENT. Review

Finding inventory

Finding inventory: PR #27158

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P2 Open scripts/should_deploy.sh:3 Security backport bundles undocumented should_deploy.sh rewrite; description omits mise/action pins R1 Leorio P2, Mafu-san/Pariston/Kite/Zoro P3, Gon/Hisoka/Mafuuu Note, Netero Nit Yes
CRF-2 Note Dropped by orchestrator (dev_image bundles go_1_26 package, does not compile against go.mod floor; PR touches neither flake.nix nor flake.lock, so the nix derivation inputs are unchanged and the build is identical pre/post) flake.nix:326 Claimed nix build_image break from raised go.mod floor R1 Mafuuu P1 No
CRF-3 Nit Posted in review body (PR description has no diff anchor) PR description Emdashes (U+2014) in PR description violate house writing rules R1 Mafu-san Body

Contested and acknowledged

(none this round)

Round log

Round 1

Netero-only gate passed (P3-and-below). Panel: Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Gon, Leorio, Kite, Komugi, Zoro (+ Netero first pass). Reviewed against db643c8..4527417.
Convergent finding: 9 of 11 reviewers flagged the undocumented should_deploy.sh cleanup bundled into the Go CVE backport (severities Note..P2); settled at P2 on the consequence trace (deploy-gating change on a release branch hidden behind a one-line description) tempered by verified behavior-preservation.
Mafuuu P1 (nix build break) dropped: empirically refuted. build_image (nix) runs nix build .#dev_image, a buildNixShellImage over devShells.default; it does not compile the coder binary or read go.mod. The buildFat packages that do compile Go are not built by this job. PR touches neither flake.nix nor flake.lock, so the dev_image build is unchanged. The three red CI checks (build_image nix, UI Review, UI Tests) are unrelated to the diff (no site/ changes; nix inputs unchanged).
Toolchain half verified complete: no stray 1.26.4 in tracked files; mise.lock checksums match the go.dev manifest (Kite); go.mod, mise.toml, mise.lock, setup-go action all move together.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The toolchain half of this backport is clean and complete. All four Go pins move together (go.mod, mise.toml, mise.lock, and the setup-go action default), no stray 1.26.4 survives in tracked files, and the mise.lock checksums were verified against the official go.dev manifest for every platform. The CVE-to-package mapping in the description checks out against the go1.26.5 release notes. As Hisoka put it: "I came to fight and found a version bump asleep in a chair. I poked it anyway."

Severity count: 1 P2, 1 Nit. One inline comment below.

On CI: three checks are red (build_image (nix), UI Review, UI Tests). None are caused by this diff. There are no site/ changes, so UI Review and UI Tests cannot regress from it. The nix job runs nix build .#dev_image, which is a buildNixShellImage over devShells.default; it bundles the unstablePkgs.go_1_26 package but never compiles the coder binary and never reads the go directive in go.mod, so a raised language floor cannot break it. The derivations that do compile Go (buildFat) are not built by this job, and this PR touches neither flake.nix nor flake.lock, so the dev_image inputs are unchanged and its hermetic result is identical before and after this PR. The red checks are pre-existing or infra; please confirm before relying on green CI, but they are not the bump's fault. (Note: an early panel reviewer flagged a P1 nix break here on the assumption that dev_image compiles against go.mod; that assumption was refuted on inspection.)

Nit (writing): the PR description uses emdashes (U+2014) in the CVE lines ("CVE-2026-39822os package"). House writing rules ban emdash/endash in authored text including PR descriptions. Replace with a colon or comma.

Recommend addressing the scope-transparency comment before merge; the change itself is sound.

🤖 This review was automatically generated with Coder Agents.

Comment thread scripts/should_deploy.sh
mtojek pushed a commit that referenced this pull request Jul 14, 2026
## Summary

Bump Go toolchain from 1.26.4 to 1.26.5.

Go 1.26.5 ([released
2026-07-07](https://go.dev/doc/devel/release#go1.26.5)) includes
security fixes addressing:

- [CVE-2026-39822](https://nvd.nist.gov/vuln/detail/CVE-2026-39822) —
`os` package
- [CVE-2026-42505](https://nvd.nist.gov/vuln/detail/CVE-2026-42505) —
`crypto/tls` package

These were flagged by the IronBank scan of
`coder/coder-enterprise/coder-service-2:2.34.5`.

## Changes

- `go.mod`: `go 1.26.4` to `go 1.26.5` (language version floor)
- `mise.toml` / `mise.lock`: Go toolchain pin 1.26.4 to 1.26.5 (this is
what actually compiles the scanned artifact and clears the CVEs)

## Related

- #27159 — backport to `release/2.35`
- #27158 — backport to `release/2.34`

Linear: ENT-129
mtojek pushed a commit that referenced this pull request Jul 14, 2026
## Summary

Backport Go toolchain bump from 1.26.4 to 1.26.5 to `release/2.35`.

Go 1.26.5 ([released
2026-07-07](https://go.dev/doc/devel/release#go1.26.5)) includes
security fixes addressing:

- [CVE-2026-39822](https://nvd.nist.gov/vuln/detail/CVE-2026-39822) —
`os` package
- [CVE-2026-42505](https://nvd.nist.gov/vuln/detail/CVE-2026-42505) —
`crypto/tls` package

These were flagged by the IronBank scan of
`coder/coder-enterprise/coder-service-2:2.34.5`.

## Changes

- `go.mod`: `go 1.26.4` to `go 1.26.5` (language version floor)
- `mise.toml` / `mise.lock`: Go toolchain pin 1.26.4 to 1.26.5 (this is
what actually compiles the scanned artifact and clears the CVEs)

## Related

- #27157 — original bump on `main`
- #27158 — backport to `release/2.34`

Linear: ENT-128
@mtojek

mtojek commented Jul 14, 2026

Copy link
Copy Markdown
Member
copying path '/nix/store/0zpyg1wzpjxlz36wabn90nhah4c6gcq4-procps-4.0.4' from 'https://cache.nixos.org/'...
copying path '/nix/store/ddk8j0xn0g1fs7qlsp1vxclsldf193av-libopenmpt-0.7.13' from 'https://cache.nixos.org/'...
copying path '/nix/store/1jasg83hbsd6m0gymnc6c740v0jl7mg8-util-linux-2.39.4-bin' from 'https://cache.nixos.org/'...
copying path '/nix/store/g13vyf3abb6l2dlri627f6sarxqn640c-roc-toolkit-0.4.0' from 'https://cache.nixos.org/'...
copying path '/nix/store/hbl9mw9pjskgf44h0zhwqpdy1zwvbkic-cups-2.4.11-dev' from 'https://cache.nixos.org/'...
copying path '/nix/store/y0ln1zra30nqpaxvk5cr707fzhqn930d-gtk+3-3.24.43' from 'https://cache.nixos.org/'...
copying path '/nix/store/f5djihc9zfb6l1kyxkzrg4zxlcajm099-xdg-utils-1.2.1' from 'https://cache.nixos.org/'...
copying path '/nix/store/1q60kahr7jwx549kidml3c1mjp1rnamy-moby-26.1.5' from 'https://cache.nixos.org/'...
error: builder for '/nix/store/af59wjk8a8ys18bam92y3jns14pgj01n-google-chrome-stable_138.0.7204.49-1_amd64.deb.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_138.0.7204.49-1_amd64.deb
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       > error: cannot download google-chrome-stable_138.0.7204.49-1_amd64.deb from any mirror
       For full logs, run:
         nix log /nix/store/af59wjk8a8ys18bam92y3jns14pgj01n-google-chrome-stable_138.0.7204.49-1_amd64.deb.drv
error: 1 dependencies of derivation '/nix/store/bc5fw07dw1f7g7y3yv7fricbynsnfx21-google-chrome-138.0.7204.49.drv' failed to build
building '/nix/store/j38qmni12zrj78dhyad9j0bcgds6v3kc-group.drv'...

This is reproducible. My best guess is that we need to adjust the version of google-chrome-stable first.

@mtojek

mtojek commented Jul 14, 2026

Copy link
Copy Markdown
Member

Possibly related changes from @geokat (not backported yet):
#26584
#26643

geokat added 2 commits July 14, 2026 12:14
`nix develop` and `nix-shell` were broken because the `nixos-24.11`
`google-chrome` derivation still pointed at Chrome 138, and Google no
longer serves that versioned `.deb`.

Update the flake's main `nixpkgs` input to `nixos-25.05` so the
shell resolves a current Chrome package again. Pin `protoc
23.4` explicitly from the upstream protobuf release archives. This keeps
the local Nix shell aligned with `mise.toml` and the CI/release codegen
toolchain.
Follow-up to #26584.

After the nixpkgs 25.05 update, the default go-migrate package panics at
startup due to its Snowflake driver before Postgres commands can run.
Coder only uses the migrate CLI for migration creation and local Postgres
migrations, so override the build tags to include only the Postgres driver.
@denisra

denisra commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Nix build_image fix: backport of #26584 + #26643

Added two cherry-picks to fix the pre-existing build_image (nix) CI failure:

Root cause

release/2.34 still had nixos-24.11 which pins Chrome 138. Google has removed that .deb from their CDN, causing a 404 during nix build .#dev_image.

Local validation

Installed nix 2.35.1 in the workspace and tested both states:

Unpatched release/2.34 — FAILS (same error as CI):

building '/nix/store/af59wjk8a8ys18bam92y3jns14pgj01n-google-chrome-stable_138.0.7204.49-1_amd64.deb.drv'...

> trying https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_138.0.7204.49-1_amd64.deb
> curl: (22) The requested URL returned error: 404
> error: cannot download google-chrome-stable_138.0.7204.49-1_amd64.deb from any mirror

error: Cannot build '/nix/store/bc5fw07dw1f7g7y3yv7fricbynsnfx21-google-chrome-138.0.7204.49.drv'.
       Reason: 1 dependency failed.

With cherry-picks applied — PASSES:

$ nix build .#dev_image --no-write-lock-file

building '/nix/store/g2rakrv01w2ylrmvrk76m8ig55p1x6qb-coderniximage-release.drv'...
building '/nix/store/9yjiyvdbyqkfbhwgq6bl0nn9s7adcvyz-oss-dogfood-nix-customisation-layer.drv'...
building '/nix/store/fh7knl288y2i8g1gsas67dxg24b4rg8v-docker-layers.drv'...
building '/nix/store/z6f97vkjnwq179hqkzpipkzs94p9nijf-oss-dogfood-nix-conf.json.drv'...
building '/nix/store/aifisxy4qjydb572q6dx064ndqjkgznh-stream-oss-dogfood-nix.drv'...
building '/nix/store/9k95k7mcl9a807lcy4mlsrp4d03l5ild-nix-shell-env.tar.gz.drv'...

$ ls -lh result
result -> /nix/store/22c4mqy1ws1ff8g31zqxlrzmvmcpafqn-nix-shell-env.tar.gz

Both cherry-picks apply cleanly with no conflicts. Files changed: flake.nix, flake.lock.

cc @mtojek — this addresses the issue you flagged. Thanks for the pointers to #26584 and #26643.

@mtojek
mtojek merged commit e885cf3 into release/2.34 Jul 14, 2026
38 of 39 checks passed
@mtojek
mtojek deleted the fix/go-1.26.5-backport-2.34 branch July 14, 2026 12:36
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 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.

3 participants