Skip to content

feat(azure_pipelines_scaler): add an option to enable demands to be case insensitive#7112

Merged
zroubalik merged 3 commits intokedacore:mainfrom
clement-mesureux:feature/azure-pipelines-option-demands-case-insensitive
Oct 6, 2025
Merged

feat(azure_pipelines_scaler): add an option to enable demands to be case insensitive#7112
zroubalik merged 3 commits intokedacore:mainfrom
clement-mesureux:feature/azure-pipelines-option-demands-case-insensitive

Conversation

@clement-mesureux
Copy link
Contributor

@clement-mesureux clement-mesureux commented Sep 29, 2025

feat(azure_pipelines_scaler): add an option to enable demands to be case insensitive

Azure Devops is case insensitive, scaler is not

When you have an Azure DevOps job with demands written in uppercase, Azure Pipelines tends to ignore them if they are configured in lowercase, and vice versa.

Checklist

Fixes #7111

Relates to #

@clement-mesureux clement-mesureux requested a review from a team as a code owner September 29, 2025 13:40
@github-actions
Copy link

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@keda-automation keda-automation requested a review from a team September 29, 2025 13:40
@semgrep-app
Copy link

semgrep-app bot commented Sep 29, 2025

Semgrep found 1 no-direct-write-to-responsewriter finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.

@clement-mesureux clement-mesureux changed the title feat(azure_pipelines_scaler): add an option to enable demands to be c… feat(azure_pipelines_scaler): add an option to enable demands to be case insensitive Sep 29, 2025
@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch 13 times, most recently from db4d8cf to dbd5537 Compare October 1, 2025 17:26
@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch 4 times, most recently from a3822cc to 8cf2d26 Compare October 1, 2025 18:33
@zroubalik
Copy link
Member

zroubalik commented Oct 2, 2025

/run-e2e azure
Update: You can check the progress here

@zroubalik zroubalik mentioned this pull request Oct 2, 2025
22 tasks
@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch from 8cf2d26 to 2cce1ef Compare October 2, 2025 16:19
@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch 5 times, most recently from beb3c4d to 0680458 Compare October 3, 2025 12:58
@clement-mesureux
Copy link
Contributor Author

hello team,

Could you please help me understand what’s wrong with my pull request? Semgrep reports:

• Findings: 4 (2 blocking)

However, I only interacted with 3 of these findings.

image

The last one cannot be addressed or responded to.

image

Thank you!

Copy link
Contributor Author

@clement-mesureux clement-mesureux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/fp This is part of a test mock. As this is not being done during actual runtime, this should be acceptable here.

@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch from 467d362 to 0680458 Compare October 3, 2025 13:56
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only one nit inline.

@JorTurFer
Copy link
Member

JorTurFer commented Oct 4, 2025

semgrepo is already okey too, just the context.TODO inlined

@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch from 365f7eb to 9109276 Compare October 6, 2025 09:36
@keda-automation keda-automation requested a review from a team October 6, 2025 09:36
…ase insensitive

Signed-off-by: Clément Mesureux <clement.mesureux@axa.fr>
@clement-mesureux clement-mesureux force-pushed the feature/azure-pipelines-option-demands-case-insensitive branch from 9109276 to 193bcf3 Compare October 6, 2025 09:51
@clement-mesureux
Copy link
Contributor Author

Thank you, team. Everything looks good. I just integrated your suggestions and proceeded with the rebase and conflict resolution.

@rickbrouwer
Copy link
Member

rickbrouwer commented Oct 6, 2025

/run-e2e azure
Update: You can check the progress here

@zroubalik zroubalik requested a review from Copilot October 6, 2025 11:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new configuration option caseInsensitiveDemandsProcessing to the Azure Pipelines scaler to enable case-insensitive comparison of pipeline job demands. This addresses an issue where Azure DevOps ignores demands based on case sensitivity differences.

  • Adds new boolean field CaseInsensitiveDemandsProcessing to scaler metadata
  • Implements case-insensitive demand matching using strings.EqualFold when enabled
  • Includes comprehensive test coverage for both case-sensitive (default) and case-insensitive behavior

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 4 comments.

File Description
pkg/scalers/azure_pipelines_scaler.go Adds new configuration field and implements case-insensitive demand matching logic
pkg/scalers/azure_pipelines_scaler_test.go Adds test cases to verify case-sensitive default behavior and new case-insensitive functionality
CHANGELOG.md Documents the new feature addition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
@keda-automation keda-automation requested a review from a team October 6, 2025 11:44
@zroubalik zroubalik enabled auto-merge (squash) October 6, 2025 11:45
@zroubalik
Copy link
Member

zroubalik commented Oct 6, 2025

/run-e2e azure
Update: You can check the progress here

@zroubalik zroubalik merged commit 03c6fa5 into kedacore:main Oct 6, 2025
24 checks passed
alt-dima pushed a commit to alt-dima/keda that referenced this pull request Dec 13, 2025
…ase insensitive (kedacore#7112)

Signed-off-by: Clément Mesureux <clement.mesureux@axa.fr>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dmitriy Altuhov <altuhovd@gmail.com>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Dec 22, 2025
…ase insensitive (kedacore#7112)

Signed-off-by: Clément Mesureux <clement.mesureux@axa.fr>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Feb 13, 2026
…ase insensitive (kedacore#7112)

Signed-off-by: Clément Mesureux <clement.mesureux@axa.fr>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Azure Pipeline Scaler] Azure Devops is case insensitive, scaler is not

5 participants