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: inputs:
version: version:
description: "The Go version to use." description: "The Go version to use."
default: "1.25.9" default: "1.26.2"
use-cache: use-cache:
description: "Whether to use the cache." description: "Whether to use the cache."
default: "true" default: "true"
+7 -7
View File
@@ -26415,19 +26415,19 @@ const docTemplate = `{
"type": "object", "type": "object",
"properties": { "properties": {
"forceQuery": { "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" "type": "boolean"
}, },
"fragment": { "fragment": {
"description": "fragment for references, without '#'", "description": "fragment for references (without '#')",
"type": "string" "type": "string"
}, },
"host": { "host": {
"description": "host or host:port (see Hostname and Port methods)", "description": "\"host\" or \"host:port\" (see Hostname and Port methods)",
"type": "string" "type": "string"
}, },
"omitHost": { "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" "type": "boolean"
}, },
"opaque": { "opaque": {
@@ -26439,15 +26439,15 @@ const docTemplate = `{
"type": "string" "type": "string"
}, },
"rawFragment": { "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" "type": "string"
}, },
"rawPath": { "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" "type": "string"
}, },
"rawQuery": { "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" "type": "string"
}, },
"scheme": { "scheme": {
+7 -7
View File
@@ -24386,19 +24386,19 @@
"type": "object", "type": "object",
"properties": { "properties": {
"forceQuery": { "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" "type": "boolean"
}, },
"fragment": { "fragment": {
"description": "fragment for references, without '#'", "description": "fragment for references (without '#')",
"type": "string" "type": "string"
}, },
"host": { "host": {
"description": "host or host:port (see Hostname and Port methods)", "description": "\"host\" or \"host:port\" (see Hostname and Port methods)",
"type": "string" "type": "string"
}, },
"omitHost": { "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" "type": "boolean"
}, },
"opaque": { "opaque": {
@@ -24410,15 +24410,15 @@
"type": "string" "type": "string"
}, },
"rawFragment": { "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" "type": "string"
}, },
"rawPath": { "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" "type": "string"
}, },
"rawQuery": { "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" "type": "string"
}, },
"scheme": { "scheme": {
+15 -13
View File
@@ -17562,19 +17562,21 @@ None
### Properties ### Properties
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
|---------------|------------------------------|----------|--------------|----------------------------------------------------| |--------------|---------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `forceQuery` | boolean | false | | append a query ('?') even if RawQuery is empty | | `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 '#' | | `fragment` | string | false | | fragment for references (without '#') |
| `host` | string | false | | host or host:port (see Hostname and Port methods) | | `host` | string | false | | "host" or "host:port" (see Hostname and Port methods) |
| `omitHost` | boolean | false | | do not emit empty host (authority) | | `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 | | `opaque` | string | false | | encoded opaque data |
| `path` | string | false | | path (relative paths may omit leading slash) | | `path` | string | false | | path (relative paths may omit leading slash) |
| `rawFragment` | string | false | | encoded fragment hint (see EscapedFragment method) | |`rawFragment`|string|false||Rawfragment is an optional field containing an encoded fragment hint. See the EscapedFragment method for more details.
| `rawPath` | string | false | | encoded path hint (see EscapedPath method) | In general, code should call EscapedFragment instead of reading RawFragment.|
| `rawQuery` | string | false | | encoded query values, without '?' | |`rawPath`|string|false||Rawpath is an optional field containing an encoded path hint. See the EscapedPath method for more details.
| `scheme` | string | false | | | In general, code should call EscapedPath instead of reading RawPath.|
| `user` | [url.Userinfo](#urluserinfo) | false | | username and password information | |`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|
## serpent.ValueSource ## serpent.ValueSource
+2 -2
View File
@@ -11,8 +11,8 @@ RUN cargo install jj-cli typos-cli watchexec-cli
FROM ubuntu:jammy@sha256:eb29ed27b0821dca09c2e28b39135e185fc1302036427d5f4d70a41ce8fd7659 AS go FROM ubuntu:jammy@sha256:eb29ed27b0821dca09c2e28b39135e185fc1302036427d5f4d70a41ce8fd7659 AS go
# Install Go manually, so that we can control the version # Install Go manually, so that we can control the version
ARG GO_VERSION=1.25.9 ARG GO_VERSION=1.26.2
ARG GO_CHECKSUM="00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1" ARG GO_CHECKSUM="990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282"
# Boring Go is needed to build FIPS-compliant binaries. # Boring Go is needed to build FIPS-compliant binaries.
RUN apt-get update && \ 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 FROM ubuntu:26.04@sha256:5e275723f82c67e387ba9e3c24baa0abdcb268917f276a0561c97bef9450d0b4 AS go
# Install Go manually, so that we can control the version # Install Go manually, so that we can control the version
ARG GO_VERSION=1.25.9 ARG GO_VERSION=1.26.2
ARG GO_CHECKSUM="00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1" ARG GO_CHECKSUM="990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282"
# Boring Go is needed to build FIPS-compliant binaries. # Boring Go is needed to build FIPS-compliant binaries.
RUN apt-get update && \ RUN apt-get update && \
+2 -2
View File
@@ -94,7 +94,7 @@
# 3. Update the sha256 and run again # 3. Update the sha256 and run again
# 4. Nix will fail with the correct vendorHash # 4. Nix will fail with the correct vendorHash
# 5. Update the vendorHash # 5. Update the vendorHash
sqlc-custom = unstablePkgs.buildGo125Module { sqlc-custom = unstablePkgs.buildGo126Module {
pname = "sqlc"; pname = "sqlc";
version = "coder-fork-aab4e865a51df0c43e1839f81a9d349b41d14f05"; version = "coder-fork-aab4e865a51df0c43e1839f81a9d349b41d14f05";
@@ -242,7 +242,7 @@
# slim bundle into it's own derivation. # slim bundle into it's own derivation.
buildFat = buildFat =
osArch: osArch:
unstablePkgs.buildGo125Module { unstablePkgs.buildGo126Module {
name = "coder-${osArch}"; name = "coder-${osArch}";
# Updated with ./scripts/update-flake.sh`. # Updated with ./scripts/update-flake.sh`.
# This should be updated whenever go.mod changes! # This should be updated whenever go.mod changes!
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/coder/coder/v2 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. // 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 // None of our dependencies seem to use the registries anyways, so this