chore: bump Go toolchain version to 1.26.2 (#24975)

## Summary
Bumps the repository Go toolchain from 1.25.9 to 1.26.2 across local
development, CI, dogfood Docker images, and Nix builds.

## Changes
- Update `go.mod` and the shared setup-go action to Go 1.26.2.
- Update dogfood Ubuntu image Go versions and the official linux-amd64
tarball checksum.
- Move Nix Go module builds from `buildGo125Module` to
`buildGo126Module`.
- Regenerate API docs affected by Go 1.26 stdlib URL documentation
changes.

## Validation
- `./scripts/check_go_versions.sh`
- `make fmt`
- `make lint`
- `make build-slim`
- `make test TEST_SHORT=1`
- `make pre-commit`

> 🤖 This PR was created with the help of Coder Agents, and needs a human
review. 🧑💻
This commit is contained in:
Atif Ali
2026-05-06 17:06:07 +05:00
committed by GitHub
parent 4385cabf6d
commit 3d03c393d2
8 changed files with 37 additions and 35 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ description: |
inputs:
version:
description: "The Go version to use."
default: "1.25.9"
default: "1.26.2"
use-cache:
description: "Whether to use the cache."
default: "true"
+7 -7
View File
@@ -26415,19 +26415,19 @@ const docTemplate = `{
"type": "object",
"properties": {
"forceQuery": {
"description": "append a query ('?') even if RawQuery is empty",
"description": "ForceQuery indicates whether the original URL contained a query ('?') character.\nWhen set, the String method will include a trailing '?', even when RawQuery is empty.",
"type": "boolean"
},
"fragment": {
"description": "fragment for references, without '#'",
"description": "fragment for references (without '#')",
"type": "string"
},
"host": {
"description": "host or host:port (see Hostname and Port methods)",
"description": "\"host\" or \"host:port\" (see Hostname and Port methods)",
"type": "string"
},
"omitHost": {
"description": "do not emit empty host (authority)",
"description": "OmitHost indicates the URL has an empty host (authority).\nWhen set, the String method will not include the host when it is empty.",
"type": "boolean"
},
"opaque": {
@@ -26439,15 +26439,15 @@ const docTemplate = `{
"type": "string"
},
"rawFragment": {
"description": "encoded fragment hint (see EscapedFragment method)",
"description": "RawFragment is an optional field containing an encoded fragment hint.\nSee the EscapedFragment method for more details.\n\nIn general, code should call EscapedFragment instead of reading RawFragment.",
"type": "string"
},
"rawPath": {
"description": "encoded path hint (see EscapedPath method)",
"description": "RawPath is an optional field containing an encoded path hint.\nSee the EscapedPath method for more details.\n\nIn general, code should call EscapedPath instead of reading RawPath.",
"type": "string"
},
"rawQuery": {
"description": "encoded query values, without '?'",
"description": "RawQuery contains the encoded query values, without the initial '?'.\nUse URL.Query to decode the query.",
"type": "string"
},
"scheme": {
+7 -7
View File
@@ -24386,19 +24386,19 @@
"type": "object",
"properties": {
"forceQuery": {
"description": "append a query ('?') even if RawQuery is empty",
"description": "ForceQuery indicates whether the original URL contained a query ('?') character.\nWhen set, the String method will include a trailing '?', even when RawQuery is empty.",
"type": "boolean"
},
"fragment": {
"description": "fragment for references, without '#'",
"description": "fragment for references (without '#')",
"type": "string"
},
"host": {
"description": "host or host:port (see Hostname and Port methods)",
"description": "\"host\" or \"host:port\" (see Hostname and Port methods)",
"type": "string"
},
"omitHost": {
"description": "do not emit empty host (authority)",
"description": "OmitHost indicates the URL has an empty host (authority).\nWhen set, the String method will not include the host when it is empty.",
"type": "boolean"
},
"opaque": {
@@ -24410,15 +24410,15 @@
"type": "string"
},
"rawFragment": {
"description": "encoded fragment hint (see EscapedFragment method)",
"description": "RawFragment is an optional field containing an encoded fragment hint.\nSee the EscapedFragment method for more details.\n\nIn general, code should call EscapedFragment instead of reading RawFragment.",
"type": "string"
},
"rawPath": {
"description": "encoded path hint (see EscapedPath method)",
"description": "RawPath is an optional field containing an encoded path hint.\nSee the EscapedPath method for more details.\n\nIn general, code should call EscapedPath instead of reading RawPath.",
"type": "string"
},
"rawQuery": {
"description": "encoded query values, without '?'",
"description": "RawQuery contains the encoded query values, without the initial '?'.\nUse URL.Query to decode the query.",
"type": "string"
},
"scheme": {
+10 -8
View File
@@ -17563,16 +17563,18 @@ None
### Properties
| Name | Type | Required | Restrictions | Description |
|---------------|------------------------------|----------|--------------|----------------------------------------------------|
| `forceQuery` | boolean | false | | append a query ('?') even if RawQuery is empty |
| `fragment` | string | false | | fragment for references, without '#' |
| `host` | string | false | | host or host:port (see Hostname and Port methods) |
| `omitHost` | boolean | false | | do not emit empty host (authority) |
|--------------|---------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `forceQuery` | boolean | false | | Forcequery indicates whether the original URL contained a query ('?') character. When set, the String method will include a trailing '?', even when RawQuery is empty. |
| `fragment` | string | false | | fragment for references (without '#') |
| `host` | string | false | | "host" or "host:port" (see Hostname and Port methods) |
| `omitHost` | boolean | false | | Omithost indicates the URL has an empty host (authority). When set, the String method will not include the host when it is empty. |
| `opaque` | string | false | | encoded opaque data |
| `path` | string | false | | path (relative paths may omit leading slash) |
| `rawFragment` | string | false | | encoded fragment hint (see EscapedFragment method) |
| `rawPath` | string | false | | encoded path hint (see EscapedPath method) |
| `rawQuery` | string | false | | encoded query values, without '?' |
|`rawFragment`|string|false||Rawfragment is an optional field containing an encoded fragment hint. See the EscapedFragment method for more details.
In general, code should call EscapedFragment instead of reading RawFragment.|
|`rawPath`|string|false||Rawpath is an optional field containing an encoded path hint. See the EscapedPath method for more details.
In general, code should call EscapedPath instead of reading RawPath.|
|`rawQuery`|string|false||Rawquery contains the encoded query values, without the initial '?'. Use URL.Query to decode the query.|
|`scheme`|string|false|||
|`user`|[url.Userinfo](#urluserinfo)|false||username and password information|
+2 -2
View File
@@ -11,8 +11,8 @@ RUN cargo install jj-cli typos-cli watchexec-cli
FROM ubuntu:jammy@sha256:eb29ed27b0821dca09c2e28b39135e185fc1302036427d5f4d70a41ce8fd7659 AS go
# Install Go manually, so that we can control the version
ARG GO_VERSION=1.25.9
ARG GO_CHECKSUM="00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1"
ARG GO_VERSION=1.26.2
ARG GO_CHECKSUM="990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282"
# Boring Go is needed to build FIPS-compliant binaries.
RUN apt-get update && \
+2 -2
View File
@@ -11,8 +11,8 @@ RUN cargo install jj-cli typos-cli watchexec-cli
FROM ubuntu:26.04@sha256:5e275723f82c67e387ba9e3c24baa0abdcb268917f276a0561c97bef9450d0b4 AS go
# Install Go manually, so that we can control the version
ARG GO_VERSION=1.25.9
ARG GO_CHECKSUM="00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1"
ARG GO_VERSION=1.26.2
ARG GO_CHECKSUM="990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282"
# Boring Go is needed to build FIPS-compliant binaries.
RUN apt-get update && \
+2 -2
View File
@@ -94,7 +94,7 @@
# 3. Update the sha256 and run again
# 4. Nix will fail with the correct vendorHash
# 5. Update the vendorHash
sqlc-custom = unstablePkgs.buildGo125Module {
sqlc-custom = unstablePkgs.buildGo126Module {
pname = "sqlc";
version = "coder-fork-aab4e865a51df0c43e1839f81a9d349b41d14f05";
@@ -242,7 +242,7 @@
# slim bundle into it's own derivation.
buildFat =
osArch:
unstablePkgs.buildGo125Module {
unstablePkgs.buildGo126Module {
name = "coder-${osArch}";
# Updated with ./scripts/update-flake.sh`.
# This should be updated whenever go.mod changes!
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/coder/coder/v2
go 1.25.9
go 1.26.2
// Required until a v3 of chroma is created to lazily initialize all XML files.
// None of our dependencies seem to use the registries anyways, so this