Skip to content

feat: Tidy Go modules after every Renovate Go update - #35

Merged
ecv merged 1 commit into
mainfrom
renovate-gomod-tidy
Nov 1, 2026
Merged

ecv merged 1 commit into
mainfrom
renovate-gomod-tidy

Conversation

@ecv

@ecv ecv commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renovate's Go updates leave stale or missing hashes in the module checksum file, so each one fails its repo's tidy or code-generation check until someone runs go mod tidy by hand.

Four updates sat red this way last week, three of them security fixes: milo-os/instrumentation#13, milo-os/search#133, milo-os/ramp-provider#2 and datum-cloud/dns-operator#438.

Renovate now runs go mod tidy itself after every Go update, in every repository of datum-cloud, milo-os and datum-labs, since all three inherit this policy.

The option is built into Renovate's Go support, so the hosted Renovate app needs no command allowlist for it.

Test plan

  • After merge, the next Renovate Go update in milo-os/search passes its tidy and code-generation checks with no hand commit

Related to datum-cloud/infra#8211

Renovate's Go updates change go.mod and go.sum but leave stale hashes for the
old module behind, and sometimes miss a hash a code generator needs. Every
Go repository checks that go mod tidy is a no-op, so those pull requests,
security fixes included, sat red until someone pushed go mod tidy by hand
(instrumentation#13, search#133, ramp-provider#2, dns-operator#438).

Key features/changes:
- Add the built-in gomodTidy post-update option for the gomod manager
- Both milo-os and datum-labs inherit this preset through their org
  configs, so one rule covers all three organisations

gomodTidy runs inside Renovate's Go manager, so the hosted app needs no
command allowlist for it, unlike postUpgradeTasks.

Related to datum-cloud/infra#8211
@ecv
ecv requested a review from a team as a code owner November 1, 2026 03:48

@kevwilliams kevwilliams 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.

Verified gomodTidy is a built-in postUpdateOption scoped to the gomod manager, so no allowlist is needed and other managers are untouched.

@ecv
ecv merged commit f4e5855 into main Nov 1, 2026
4 checks passed
@ecv
ecv deleted the renovate-gomod-tidy branch November 1, 2026 04:54
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.

2 participants