fix(renovate): run go mod tidy on dependency updates - #161
Merged
Merged
Conversation
Without postUpdateOptions.gomodTidy, Renovate only patches the go.sum entries for the module it bumped. When that shifts transitive versions used solely by the go.mod `tool(...)` block (gotestsum, gofumpt, goimports), go.sum ends up missing entries for their own dependencies, and `go tool gotestsum` fails in CI with "missing go.sum entry" errors unrelated to the PR's actual change. This has been silently breaking several open Renovate PRs (#136, #138, #139). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgKYpETCoqe5rCiiGaUrx5
|
Warning Review limit reachedNext included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three open Renovate PRs (#136 gofumpt, #138 x/crypto, #139 x/tools) are failing CI with
go tool gotestsum: missing go.sum entryerrors that are unrelated to their actual dependency bumps.Root cause:
renovate.jsondoesn't setpostUpdateOptions: ["gomodTidy"], so Renovate only patchesgo.sumentries for the module it bumped rather than running a fullgo mod tidy. When a bump shifts transitive versions used solely by thego.modtool(...)block (gotestsum,gofumpt,goimports) — which aren't in the main dependency graphgo mod downloadwalks —go.sumends up missing entries for their own indirect dependencies (golang.org/x/text,x/sync,x/term, etc.), andgo tool gotestsumfails at CI time.Adding
gomodTidymakes Renovate rungo mod tidyafter every update, keepinggo.sumfully consistent (matching what a contributor runninggo mod tidylocally would produce).Test plan
go mod tidyon the affected branches produces a complete, consistentgo.sumandgo tool gotestsumthen succeeds.🤖 Generated with Claude Code
https://claude.ai/code/session_01KgKYpETCoqe5rCiiGaUrx5
Generated by Claude Code