Add a db consistency check to remove runners that do not belong to a repository (#30614) (#30653)

Backport #30614
This commit is contained in:
Zettat123 authored and GitHub committed 2024-04-24 00:08:06 +00:00
1 parent 03518d3e18
commit ddf64b84e4
2 files changed
+30 -2

No files matched your search

+6
View File
@@ -158,6 +158,12 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
Fixer: actions_model.FixRunnersWithoutBelongingOwner,
FixedMessage: "Removed",
},
{
Name: "Action Runners without existing repository",
Counter: actions_model.CountRunnersWithoutBelongingRepo,
Fixer: actions_model.FixRunnersWithoutBelongingRepo,
FixedMessage: "Removed",
},
}
// TODO: function to recalc all counters