Lower go directive to minimum required version#165
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughRename and adjust the weekly Go upgrade workflow to use the Go toolchain updater; add/modify toolchain directives in the root Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/weekly-go-upgrade.yml (1)
26-32: Workflow intent and command behavior are misaligned.The workflow is framed as a toolchain upgrade, but Line 31 uses
go get go@latestintest/integration, which upgrades thegodirective rather than thetoolchaindirective. The root module (go 1.25.0+toolchain go1.26.1) usesgo get toolchain@latestat Line 28, keeping thegodirective unchanged. For consistency, either:
- Update Line 31 to
go get toolchain@latestto match the root strategy, or- Clarify why
test/integrationintentionally tracks a separategoversion🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/weekly-go-upgrade.yml around lines 26 - 32, The workflow currently mixes upgrading the Go toolchain and the module 'go' directive: it runs "go get toolchain@latest" at the root but uses "go get go@latest" in the test/integration module; change the test/integration invocation to "go get toolchain@latest" to match the root strategy (or explicitly document why test/integration should track a different 'go' directive), ensuring consistency between the "go get toolchain@latest" steps and the module "go" vs "toolchain" directives (e.g., the root's "go 1.25.0" and "toolchain go1.26.1" vs test/integration).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/integration/go.mod`:
- Line 1: The module declaration in the integration module is incorrect: update
the module path string currently set to "module github.com/localstack/lstk" so
that the integration package declares itself as "module
github.com/localstack/lstk/test/integration" (i.e., change the module line in
test/integration/go.mod to the integration-specific path) to resolve the
duplicate-module conflict referenced by the require of
github.com/localstack/lstk/test/integration.
- Line 69: Replace the vulnerable grpc dependency version
"google.golang.org/grpc v1.77.0" in the go.mod entry with
"google.golang.org/grpc v1.79.3" (or any later patch >= v1.79.3) to mitigate
CVE-2026-33186, then run "go get google.golang.org/grpc@v1.79.3" and "go mod
tidy" to update go.sum and vendor files; ensure the test/integration go.mod
entry is the one updated.
---
Nitpick comments:
In @.github/workflows/weekly-go-upgrade.yml:
- Around line 26-32: The workflow currently mixes upgrading the Go toolchain and
the module 'go' directive: it runs "go get toolchain@latest" at the root but
uses "go get go@latest" in the test/integration module; change the
test/integration invocation to "go get toolchain@latest" to match the root
strategy (or explicitly document why test/integration should track a different
'go' directive), ensuring consistency between the "go get toolchain@latest"
steps and the module "go" vs "toolchain" directives (e.g., the root's "go
1.25.0" and "toolchain go1.26.1" vs test/integration).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: f5dfa36b-8622-4837-9202-815d015f2a19
⛔ Files ignored due to path filters (1)
test/integration/go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
.github/workflows/weekly-go-upgrade.ymlgo.modtest/integration/go.mod
|
Nice! Yes, I can confirm this will be helpful downstream. |
Motivation
The
godirective ingo.modwas being bumped to the latest Go release weekly, but it specifies the minimum version required to build the module — not the target. Setting it to bleeding-edge made it harder for downstream packagers (AUR, Nix /cc @purcell) to build lstk without the latest Go toolchain.Changes
godirective to1.25.0(the actual minimum, constrained bygolang.org/x/sysandgolang.org/x/term)toolchain go1.26.1directive so CI and developers still use the latest Go via auto-downloadtoolchaininstead ofgo— packagers usingGOTOOLCHAIN=localare unaffected by toolchain bumpsgo-version-file: go.mod(which reads thetoolchaindirective)Tests
tidyCI job will verifygo mod tidyproduces no diffRelated