Skip to content

Bump Go toolchain to 1.26.4#2705

Open
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums/bump-go-1-26-4
Open

Bump Go toolchain to 1.26.4#2705
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums/bump-go-1-26-4

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

Moves the project from the Go 1.25 line to the latest stable Go 1.26.4. This is a deliberate minor-version bump, so it gets its own PR with full CI rather than an admin/digest-only update.

Pins changed

File Before After
go.mod go 1.25.0 go 1.26.0 (language floor)
Dockerfile golang:1.25.11-alpine@sha256:8d95af53… golang:1.26.4-alpine@sha256:f1ddd9fe14fffc091dd98cb4bfa999f32c5fc77d2f2305ea9f0e2595c5437c14
.github/workflows/lint.yml go-version: '1.25' go-version: '1.26'
.github/copilot-instructions.md golang:1.25.8-alpine reference golang:1.26.4-alpine
.golangci.yml disable only the modernize newexpr analyzer (see below)

Notes:

  • No toolchain directive was added — go mod tidy did not introduce one.
  • The Docker digest is the real index digest (resolved via docker buildx imagetools inspect golang:1.26.4-alpine), verified by pulling it and running go versiongo1.26.4.
  • Most CI workflows follow go-version-file: go.mod (go.yml, docs-check.yml, goreleaser.yml, license-check.yml, mcp-diff.yml), so they pick up 1.26 automatically. Only lint.yml pinned a literal version, now updated. registry-releaser.yml uses go-version: "stable" and code-scanning.yml resolves from CodeQL config — both unaffected.

New Go 1.26 lint finding — and why it's scoped out

Bumping go.mod to 1.26 enables the modernize newexpr modernizer (the new new(expr) builtin). golangci-lint's max-same-issues: 3 made it look like only 11 findings, but it actually flags ~1,176 github.Ptr(...)new(...) rewrites across 33 files. That's a sweeping, unrelated refactor — out of scope for a toolchain bump.

Rather than churn the whole codebase or blanket-disable a linter, I disabled only the newexpr analyzer in .golangci.yml (all other modernize checks stay active). Adopting new(expr) can be done later as a separate, focused change. Flagging for maintainer review in case you'd prefer the wholesale adoption instead.

No other new go vet / staticcheck / golangci-lint findings appeared.

Validation

  • go mod tidy — clean, no toolchain directive added
  • go build ./... — ✅
  • script/lint (gofmt + golangci-lint v2.9) — ✅ 0 issues
  • script/test (go test -race ./...) — ✅ all packages pass
  • script/generate-docs — README.md already current (no change). Two unrelated docs files (docs/feature-flags.md, docs/insiders-features.md) showed pre-existing drift unrelated to this bump and were intentionally left untouched to keep the PR focused.
  • Docker base image digest pulled and verified as go1.26.4.

Please let full CI validate — do not force-merge.

Move the project from the Go 1.25 line to the latest stable Go 1.26.4.

- go.mod: go directive 1.25.0 -> 1.26.0 (language floor; no toolchain
  directive introduced by `go mod tidy`)
- Dockerfile: golang:1.25.11-alpine -> golang:1.26.4-alpine, repinned to
  the current index digest
- .github/workflows/lint.yml: go-version 1.25 -> 1.26 (other workflows use
  go-version-file: go.mod and follow automatically)
- .github/copilot-instructions.md: update Dockerfile reference
- .golangci.yml: disable only the modernize `newexpr` analyzer; the Go 1.26
  new(expr) feature otherwise flags ~1.2k github.Ptr() call sites, which is
  out of scope for a toolchain bump

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner June 16, 2026 09:15
Copilot AI review requested due to automatic review settings June 16, 2026 09:15

Copilot AI 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.

Pull request overview

Updates this repository’s Go version baseline and tooling configuration to move from the Go 1.25 line to Go 1.26, and updates build/CI pins accordingly.

Changes:

  • Bump go.mod language version to Go 1.26.0.
  • Update the Docker build stage to golang:1.26.4-alpine (digest pinned) and adjust CI lint workflow’s Go setup.
  • Configure golangci-lint to disable only modernize’s newexpr analyzer to avoid a large out-of-scope rewrite.
Show a summary per file
File Description
go.mod Raises the module’s Go language version floor to 1.26.0.
Dockerfile Updates the builder image to Go 1.26.4 (digest pinned).
.golangci.yml Disables only modernize’s newexpr analyzer while keeping modernize enabled.
.github/workflows/lint.yml Updates the lint workflow’s Go version selection for Go 1.26.
.github/copilot-instructions.md Updates contributor guidance to reference the new Docker Go version.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment thread go.mod
Comment on lines 1 to 4
module github.com/github/github-mcp-server

go 1.25.0
go 1.26.0

Comment on lines 19 to 22
- uses: actions/setup-go@v6
with:
go-version: '1.25'
go-version: '1.26'
- name: golangci-lint
Comment on lines 95 to +97
- **go.mod / go.sum:** Go module dependencies (Go 1.24.0+)
- **.golangci.yml:** Linter configuration (v2 format, ~15 linters enabled)
- **Dockerfile:** Multi-stage build (golang:1.25.8-alpine → distroless)
- **Dockerfile:** Multi-stage build (golang:1.26.4-alpine → distroless)

@javi0guerrero4-cloud javi0guerrero4-cloud 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.

Merge

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.

3 participants