Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Signed-off-by: patst <patrick.steinig@googlemail.com>
  • Loading branch information
patst and JorTurFer committed Feb 7, 2023
1 parent d63b671 commit 822a0de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Here is an overview of all new **experimental** features:

### Improvements

- **Azure Pipelines Scaler:** New configuration parameter `requireAllDemands` to scale only if jobs request all demands provided by the scaling definition ([#4138](https://github.com/kedacore/keda/issues/4138))
- **General**: Add a warning when KEDA run outside supported k8s versions ([#4130](https://github.com/kedacore/keda/issues/4130))
- **General**: Use (self-signed) certificates for all the communications (internals and externals) ([#3931](https://github.com/kedacore/keda/issues/3931))
- **Azure Pipelines Scaler:** New configuration parameter `requireAllDemands` to scale only if jobs request all demands provided by the scaling definition ([#4138](https://github.com/kedacore/keda/issues/4138))
- **Hashicorp Vault**: Add support to secrets backend version 1 ([#2645](https://github.com/kedacore/keda/issues/2645))
- **RabbitMQ Scaler**: Add TLS support ([#967](https://github.com/kedacore/keda/issues/967))
- **Redis Scalers**: Add support to Redis 7 ([#4052](https://github.com/kedacore/keda/issues/4052))
Expand Down
5 changes: 3 additions & 2 deletions pkg/scalers/azure_pipelines_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ func getCanAgentDemandFulfilJob(jr JobRequest, metadata *azurePipelinesMetadata)
}
}
}
matchDemands := countDemands == len(demandsReq)-1
if metadata.requireAllDemands {
return countDemands == len(demandsAvail) && len(demandsAvail) == len(demandsReq)-1
return matchDemands && countDemands == len(demandsAvail)
}
return countDemands == len(demandsReq)-1
return matchDemands
}

// Determine if the Job and Parent Agent Template have matching capabilities
Expand Down

0 comments on commit 822a0de

Please sign in to comment.