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:
parent
eeb8bf6457
commit
ec0fd6e3f8
9 changed files with 487 additions and 187 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue