RUNTIME UPGRADE: go runtime go1.25.6 → go1.26.1 #1050
RUNTIME UPGRADE: go runtime go1.25.6 → go1.26.1 #1050campaigner-prod[bot] wants to merge 5 commits intomainfrom
Conversation
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 820ac26 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings. Use ⏳ Processing |
golangci-lint v2.8.0 was built with Go 1.25 and fails to lint code targeting Go 1.26.1. v2.11.3 is the latest release with Go 1.26 support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf (QF1012) - Add blank lines required by wsl_v5 linter - Suppress G118 false positive on cancel func stored in ctxTuple Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix remaining QF1012 (WriteString/Sprintf) in dns_disruption.go - Fix wsl_v5 whitespace issues in cpu_stress.go and pod_replacement.go Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cc615b3 to
820ac26
Compare
Summary: Runtime update — Go 1.25.6 → 1.26.1
What this PR does
Adds
toolchain go1.26.1to go.mod and updatesBUILDGOVERSIONin the Makefile.Why golangci-lint had to be upgraded
The original Makefile pinned golangci-lint at v2.8.0, which was built with Go 1.25. When go.mod targets Go 1.26.1, golangci-lint refuses to run:
Upgraded to v2.11.3 (latest, built with Go 1.26) to resolve this.
Changes made to fix lint
golangci-lint v2.11.3 introduced stricter checks that flagged existing code.
QF1012 (staticcheck) — 2 files:
api/v1beta1/dns_disruption.go,cpuset/cpuset.go: ReplacedWriteString(fmt.Sprintf(...))withfmt.Fprintf(...). Semantically identical —strings.Builderimplementsio.Writer.wsl (whitespace linter) — 8 files:
cli/chaosli/cmd/context.go,create.go,version.go,cli/handler/main.go,cli/injector/grpc_disruption.go,cpu_stress.go,pod_replacement.go,config/config.go. Pure formatting, no behavioral change.G118 (gosec) — 1 file — please review:
watchers/watcher.goline 191: Added//nolint:goseconcontext.WithCancel. G118 flags cancel functions that aren't deferred, but herecacheCancelFuncis intentionally stored inw.ctxTupleand called later inwatcher.Clean()(line 140). The cancel function must outlive theStart()scope. The nolint is justified but flagging it for your review since it's your codebase.Makefile comment note
Line 9 has a comment:
# change also github actions go build version "GO_VERSION:" if you change the version below. The CI workflow (ci.yml) no longer has aGO_VERSIONenv var — it usesgo-version-file: go.modinstead. The comment appears stale.Review Checklist
//nolint:gosecinwatchers/watcher.go— confirm cancel func lifecycle is correctfmt.Fprintfchanges are semantically equivalent🤖 Original PR generated by DataDog Automated Dependency Management System. CI fixes by Claude Code.