Skip to content

Upgrade to Go 1.27.4 and golangci-lint 2.15.0 - #59

Merged
bgentry merged 1 commit into
masterfrom
bg/go-1.27-toolchain
Nov 15, 2026
Merged

bgentry merged 1 commit into
masterfrom
bg/go-1.27-toolchain

Conversation

@bgentry

@bgentry bgentry commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🤖 apiframe lint CI fails when its floating stable Go version advances beyond the pinned golangci-lint release. In the failed run, Go 1.27.4 with golangci-lint 2.13.1 reports export data version 5 is greater than maximum supported version 4 before it can analyze the code.

Set the development toolchain to Go 1.27.4 through toolchain go1.27.4 in go.mod, upgrade golangci-lint to 2.15.0, and have both primary CI jobs read the toolchain from go.mod. This aligns their Go versions and prevents the lint job from independently advancing to a newer Go release.

Keep go 1.26.0 as the module minimum to preserve River's current and previous Go release support policy. Add a separate compatibility job that runs the suite on the latest Go 1.26 patch with GOTOOLCHAIN=local, ensuring automatic toolchain upgrades cannot hide incompatibilities with the oldest supported Go release.

Limit the CI workflow's GITHUB_TOKEN permissions to contents: read, covering all three jobs and resolving CodeQL's missing workflow permissions alert.

Lint CI follows stable Go while golangci-lint stays pinned, allowing the
compiler's export format to outgrow the linter's decoder and prevent
analysis.

Select Go 1.27.4 as the development toolchain and upgrade golangci-lint to
2.15.0. Read the same toolchain declaration in both primary CI jobs so
their Go versions stay aligned.

Preserve Go 1.26 as the module minimum to match River's supported release
range. Add a Go 1.26 compatibility job with `GOTOOLCHAIN=local` so automatic
toolchain selection cannot hide incompatibilities with that release.
Declare read-only repository access for the CI token instead of relying
on inherited token permissions.
@bgentry
bgentry force-pushed the bg/go-1.27-toolchain branch from 4c6e547 to e2aabdf Compare November 15, 2026 19:52
Comment thread .github/workflows/ci.yaml
Comment on lines +9 to +10
permissions:
contents: read

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixing a CodeQL medium complaint with this bit

@bgentry
bgentry requested a review from brandur November 15, 2026 19:55
@bgentry

bgentry commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@brandur FYI for visibility, noticed CI failed on master on latest dep update merge. This fixes the causes.

@bgentry
bgentry merged commit bc1769e into master Nov 15, 2026
6 checks passed
@bgentry
bgentry deleted the bg/go-1.27-toolchain branch November 15, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant