Skip to content

Commit

Permalink
Fixed in_progress detection on running jobs instead of just `queued… (
Browse files Browse the repository at this point in the history
#5618)

Signed-off-by: Eldarrin <mortxbox@live.com>
  • Loading branch information
Eldarrin authored Mar 25, 2024
1 parent 76c6ac0 commit 1e1cfb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Here is an overview of all new **experimental** features:
- **General**: Fix CVE-2024-28180 in github.com/go-jose/go-jose/v3 ([#5617](https://github.com/kedacore/keda/pull/5617))
- **General**: Prometheus metrics shows errors correctly ([#5597](https://github.com/kedacore/keda/issues/5597))
- **General**: Validate empty array value of triggers in ScaledObject/ScaledJob creation ([#5520](https://github.com/kedacore/keda/issues/5520))
- **GitHub Runner Scaler**: Fixed `in_progress` detection on running jobs instead of just `queued` ([#5604](https://github.com/kedacore/keda/issues/5604))

### Deprecations

Expand Down
4 changes: 2 additions & 2 deletions pkg/scalers/github_runner_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func stripDeadRuns(allWfrs []WorkflowRuns) []WorkflowRun {
var filtered []WorkflowRun
for _, wfrs := range allWfrs {
for _, wfr := range wfrs.WorkflowRuns {
if wfr.Status == "queued" {
if wfr.Status == "queued" || wfr.Status == "in_progress" {
filtered = append(filtered, wfr)
}
}
Expand Down Expand Up @@ -638,7 +638,7 @@ func (s *githubRunnerScaler) GetWorkflowQueueLength(ctx context.Context) (int64,
return -1, err
}
for _, job := range jobs {
if job.Status == "queued" && canRunnerMatchLabels(job.Labels, s.metadata.labels) {
if (job.Status == "queued" || job.Status == "in_progress") && canRunnerMatchLabels(job.Labels, s.metadata.labels) {
queueCount++
}
}
Expand Down

0 comments on commit 1e1cfb1

Please sign in to comment.