From 4c21f44e7cde7cc1f8bce261409c46f42cac8c3d Mon Sep 17 00:00:00 2001 From: Evan Vetere Date: Sat, 31 Oct 2026 23:48:37 -0400 Subject: [PATCH] feat: Tidy Go modules after every Go update 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 --- renovate-config.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renovate-config.json b/renovate-config.json index f5d4265..c895b70 100644 --- a/renovate-config.json +++ b/renovate-config.json @@ -20,6 +20,11 @@ "matchDepNames": ["/^(docker\\.io/)?(library/)?node$/"], "groupName": "Node.js", "dependencyDashboardApproval": false + }, + { + "description": "Run go mod tidy after a Go module update, so go.sum gains the hashes the new versions need and loses the ones nothing uses.", + "matchManagers": ["gomod"], + "postUpdateOptions": ["gomodTidy"] } ] }