Remove unnecessary scale-target-not-found error on in_progress workflow_job event (#927)
Ref https://github.com/actions-runner-controller/actions-runner-controller/issues/877#issuecomment-955614456
This commit is contained in:
parent
b305e38b17
commit
2191617eb5
|
|
@ -224,7 +224,7 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) Handle(w http.Respons
|
||||||
|
|
||||||
labels := e.WorkflowJob.Labels
|
labels := e.WorkflowJob.Labels
|
||||||
|
|
||||||
switch e.GetAction() {
|
switch action := e.GetAction(); action {
|
||||||
case "queued", "completed":
|
case "queued", "completed":
|
||||||
target, err = autoscaler.getJobScaleUpTargetForRepoOrOrg(
|
target, err = autoscaler.getJobScaleUpTargetForRepoOrOrg(
|
||||||
context.TODO(),
|
context.TODO(),
|
||||||
|
|
@ -248,7 +248,13 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) Handle(w http.Respons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
ok = true
|
||||||
|
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
|
||||||
|
log.V(2).Info("Received and ignored a workflow_job event as it triggers neither scale-up nor scale-down", "action", action)
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
case *gogithub.PingEvent:
|
case *gogithub.PingEvent:
|
||||||
ok = true
|
ok = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue