mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-13 13:06:51 +00:00
Resolves the erroneous webhook scale down due to check runs (#2119)
Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
This commit is contained in:
@@ -210,9 +210,9 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) Handle(w http.Respons
|
|||||||
if e.GetAction() == "queued" {
|
if e.GetAction() == "queued" {
|
||||||
target.Amount = 1
|
target.Amount = 1
|
||||||
break
|
break
|
||||||
} else if e.GetAction() == "completed" && e.GetWorkflowJob().GetConclusion() != "skipped" {
|
} else if e.GetAction() == "completed" && e.GetWorkflowJob().GetConclusion() != "skipped" && e.GetWorkflowJob().GetRunnerID() > 0 {
|
||||||
// A nagative amount is processed in the tryScale func as a scale-down request,
|
// A negative amount is processed in the tryScale func as a scale-down request,
|
||||||
// that erasese the oldest CapacityReservation with the same amount.
|
// that erases the oldest CapacityReservation with the same amount.
|
||||||
// If the first CapacityReservation was with Replicas=1, this negative scale target erases that,
|
// If the first CapacityReservation was with Replicas=1, this negative scale target erases that,
|
||||||
// so that the resulting desired replicas decreases by 1.
|
// so that the resulting desired replicas decreases by 1.
|
||||||
target.Amount = -1
|
target.Amount = -1
|
||||||
|
|||||||
Reference in New Issue
Block a user