Delete all inactionable jobs

GARM cares about jobs in queued state for anything that requires
decision making. Anything else is purely informational.

This change cleans up all inactionable jobs and refuses to record jobs
that are not already in the database, have an inactionable state and
which do not have a runner we own handling them.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2026-02-10 14:08:44 +02:00 committed by Gabriel
parent eeb8bf6457
commit ec0fd6e3f8
9 changed files with 487 additions and 187 deletions

View file

@ -400,7 +400,7 @@ func (g *githubClient) getOrganizationRunnerGroupIDByName(ctx context.Context, e
}
return 0, fmt.Errorf("error fetching runners: %w", err)
}
if err == nil && ghResp != nil {
if ghResp != nil {
g.recordLimits(ghResp.Rate)
}
@ -440,7 +440,7 @@ func (g *githubClient) getEnterpriseRunnerGroupIDByName(ctx context.Context, ent
}
return 0, fmt.Errorf("error fetching runners: %w", err)
}
if err == nil && ghResp != nil {
if ghResp != nil {
g.recordLimits(ghResp.Rate)
}
for _, runnerGroup := range runnerGroups.RunnerGroups {