Skip to content

Add requireAllDemandsAndIgnoreOthers flag#5839

Merged
JorTurFer merged 1 commit intokedacore:mainfrom
Nohac:main
Feb 11, 2025
Merged

Add requireAllDemandsAndIgnoreOthers flag#5839
JorTurFer merged 1 commit intokedacore:mainfrom
Nohac:main

Conversation

@Nohac
Copy link
Contributor

@Nohac Nohac commented May 30, 2024

This PR adds an extra option requireAllDemandsAndIgnoreOthers (name tbd) to the azure pipeline scaler which ensures that all demands in the scaler definition is present in the incoming job, while ignoring any other demands the job may have.

This is different from requireAllDemands which requires all demands to be an exact match.

Checklist

Fixes #5579

@semgrep-app
Copy link

semgrep-app bot commented May 30, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

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()'.

Ignore this finding from no-direct-write-to-responsewriter.

@semgrep-app
Copy link

semgrep-app bot commented Jun 3, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

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()'.

Ignore this finding from no-direct-write-to-responsewriter.

@stale
Copy link

stale bot commented Aug 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Aug 2, 2024
@stale
Copy link

stale bot commented Aug 9, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this Aug 9, 2024
@JorTurFer JorTurFer reopened this Sep 2, 2024
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Sep 2, 2024
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.

Could you fix the DCO check and update the changelog too?

@JorTurFer
Copy link
Member

JorTurFer commented Sep 2, 2024

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

@semgrep-app
Copy link

semgrep-app bot commented Sep 2, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

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()'.

Ignore this finding from no-direct-write-to-responsewriter.

@stale
Copy link

stale bot commented Nov 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Nov 7, 2024
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Nov 7, 2024
@semgrep-app
Copy link

semgrep-app bot commented Nov 7, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

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()'.

Ignore this finding from no-direct-write-to-responsewriter.

@Nohac Nohac marked this pull request as ready for review November 7, 2024 09:23
@Nohac Nohac requested a review from a team as a code owner November 7, 2024 09:23
@semgrep-app
Copy link

semgrep-app bot commented Dec 4, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo

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()'.

Ignore this finding from no-direct-write-to-responsewriter

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Could you please fix DCO and add ingore for semgrep for the test?

@stale
Copy link

stale bot commented Feb 2, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Feb 2, 2025
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Feb 2, 2025
@semgrep-app
Copy link

semgrep-app bot commented Feb 2, 2025

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo

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()'.

Ignore this finding from no-direct-write-to-responsewriter

@Nohac
Copy link
Contributor Author

Nohac commented Feb 2, 2025

I've fixed DCO and moved the documentation kedacore/keda-docs#1496 to 2.17
I'm not sure how to disable the 'Semgrep' test..

Copy link

@jan-mrm jan-mrm left a comment

Choose a reason for hiding this comment

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

About the 'Semgrep' I'd think they want something like those 2 suggestions that I just made here - a comment to ignore the 2 findings

@semgrep-app
Copy link

semgrep-app bot commented Feb 4, 2025

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo

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()'.

Ignore this finding from no-direct-write-to-responsewriter

@zroubalik
Copy link
Member

zroubalik commented Feb 6, 2025

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

@JorTurFer
Copy link
Member

JorTurFer commented Feb 8, 2025

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

@JorTurFer
Copy link
Member

JorTurFer commented Feb 10, 2025

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

@JorTurFer
Copy link
Member

JorTurFer commented Feb 10, 2025

Could you fix DCO please? https://github.com/kedacore/keda/pull/5839/checks?check_run_id=36986822520

I merged the docs by mistake and this PR is left :/

Signed-off-by: jonas <jonas.rudlang@gmail.com>
@JorTurFer
Copy link
Member

JorTurFer commented Feb 11, 2025

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

@JorTurFer JorTurFer enabled auto-merge (squash) February 11, 2025 08:44
@JorTurFer JorTurFer merged commit a8fb1f8 into kedacore:main Feb 11, 2025
21 checks passed
mittalvaibhav1 pushed a commit to mittalvaibhav1/keda that referenced this pull request Apr 26, 2025
Signed-off-by: mittalvaibhav1 <mittalvaibhavandroid@gmail.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.

Extending the Azure DevOps Agent scaling - possibility to "ignore" demands

4 participants