Skip to content

update go version 1.26.4 - #25286

Merged
9 commits merged into
mainfrom
unknown repository
Jul 2, 2026
Merged

9 commits merged into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 1, 2026 •

Copy link
Copy Markdown

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue#25255

What this PR does / why we need it:

update go version 1.26.4 and go1.26.4-jdk8

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Bump Go toolchain to 1.26.4 and refresh build/test images

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Upgrade the project’s minimum Go version to 1.26.4.
• Update build/test Docker base images to Go 1.26.4 variants.
• Switch golangci-lint installation to go install and refresh Sonic deps.
Diagram

graph TD
  CI["CI / Developers"] --> MF["Makefile (tools)"] --> LINT["golangci-lint install"]
  CI --> MOD["go.mod / go.sum"] --> BUILD["Go build & tests"]
  CI --> IMG["Docker build"] --> BASE{{"matrixorigin base images"}}
  IMG --> BVT["BVT tester images"]
  BASE --> BUILD
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add `toolchain go1.26.4` in go.mod
  • ➕ More strongly pins the Go toolchain used in CI/local (where supported)
  • ➕ Reduces “works on my machine” drift when multiple Go versions are installed
  • ➖ Requires developers/CI runners to use Go versions that understand the toolchain directive
  • ➖ May need documentation updates for environments that vendor toolchains differently
2. Keep curl-based golangci-lint installer with checksum verification
  • ➕ Doesn’t rely on go install behavior or module proxy availability
  • ➕ Can install prebuilt binaries faster in some environments
  • ➖ More supply-chain risk if not pinned and checksum-verified
  • ➖ Harder to audit and maintain than a module-pinned go install
3. Run linting exclusively inside a pinned Docker image
  • ➕ Maximally reproducible tooling across CI and developers
  • ➕ Avoids installing tooling on the host entirely
  • ➖ Adds Docker dependency for contributors
  • ➖ May slow iteration for local lint runs

Recommendation: The current approach (bumping Go to 1.26.4, aligning Docker bases, and installing golangci-lint via go install) is a good default for reproducibility and simpler maintenance. Consider additionally using the toolchain directive if the project’s supported environments are aligned, to further reduce Go-version drift.

Files changed (7) +12 / -12

Other (7) +12 / -12
MakefileInstall golangci-lint via 'go install' instead of curl script +1/-1

Install golangci-lint via 'go install' instead of curl script

• Replaces the curl-piped installer script with a module-pinned 'go install' invocation for golangci-lint v2.6.2. This simplifies tool installation and improves auditability.

Makefile

go.modBump minimum Go version and update Sonic dependencies +3/-3

Bump minimum Go version and update Sonic dependencies

• Raises the module’s declared minimum Go version from 1.25.4 to 1.26.4. Updates 'github.com/bytedance/sonic' and its loader dependency to newer patch versions.

go.mod

go.sumRefresh checksums for updated Sonic modules +4/-4

Refresh checksums for updated Sonic modules

• Updates go.sum entries to match the newer 'sonic' and 'sonic/loader' versions introduced in go.mod.

go.sum

DockerfileUpdate BVT/UT tester base image to go1.26.4-jdk8 +1/-1

Update BVT/UT tester base image to go1.26.4-jdk8

• Switches the tester base image tag from go1.25.4-jdk8 to go1.26.4-jdk8 to match the new toolchain baseline.

optools/bvt_ut/Dockerfile

Dockerfile.testerUpdate compose BVT tester base image to go1.26.4-jdk8 +1/-1

Update compose BVT tester base image to go1.26.4-jdk8

• Aligns the compose BVT tester container with the updated go1.26.4-jdk8 base image tag.

optools/compose_bvt/Dockerfile.tester

DockerfileBump builder image to matrixorigin/golang:1.26.4-ubuntu22.04 +1/-1

Bump builder image to matrixorigin/golang:1.26.4-ubuntu22.04

• Updates the builder stage base image from Go 1.25 to Go 1.26.4 on Ubuntu 22.04, aligning container builds with the new minimum Go version.

optools/images/Dockerfile

Dockerfile.devBump dev image to matrixorigin/golang:1.26.4-ubuntu22.04 +1/-1

Bump dev image to matrixorigin/golang:1.26.4-ubuntu22.04

• Updates the development container base image to Go 1.26.4 on Ubuntu 22.04 for faster local iteration with the same toolchain as CI.

optools/images/Dockerfile.dev

@qodo-code-review

qodo-code-review Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Golangci-lint PATH regression ✓ Resolved 🐞 Bug ☼ Reliability
Description
install-static-check-tools now installs golangci-lint via go install without forcing a known
install directory, but static-check still runs golangci-lint by name, so the lint step can fail
when the Go install dir (e.g., a custom GOBIN) isn’t on PATH. Previously the installer
explicitly placed the binary into $(GOPATH)/bin.
Code

Makefile[R1043-1046]

+	@go install github.com/golangci/golangci-lint/v2/cmd/[email protected]
  @go install github.com/matrixorigin/linter/cmd/molint@latest
  @go install github.com/apache/skywalking-eyes/cmd/[email protected]
Evidence
The Makefile installs golangci-lint without specifying an install directory and later invokes
golangci-lint via PATH; although GOPATH is computed, it’s not used to pin the tool location.

Makefile[1041-1053]
Makefile[52-58]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`make install-static-check-tools` installs `golangci-lint` using `go install`, but `make static-check` later invokes `golangci-lint` as a bare command. If the Go install directory is not on `PATH`, `static-check` fails with command-not-found.
## Issue Context
The Makefile already computes `GOPATH` via `go env GOPATH`, but the install target does not use it to control where the binary is installed.
## Fix Focus Areas
- Makefile[1041-1053]
- Makefile[52-58]
## Suggested fix
Update `install-static-check-tools` to force a consistent install location (and/or update invocations to use an explicit path), e.g.:
- `@GOBIN=$(GOPATH)/bin go install github.com/golangci/golangci-lint/v2/cmd/[email protected]`
- (Optionally do the same for `molint` and `license-eye` for consistency)
- Or change `static-check` to call `$(GOPATH)/bin/golangci-lint` (and similarly for other tools).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread Makefile Resolved
This pull request was closed.

This branch had an error being deployed

1 failed deployment
ci — 665c833e Deployed Jul 2, 2026 by ghost via merge-update-moc / Update MOC #2673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants