Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate values length for prometheus scaler #2264

Merged

Conversation

sosoftmandruszak
Copy link
Contributor

@sosoftmandruszak sosoftmandruszak commented Nov 9, 2021

Signed-off-by: Magdalena Andruszak mandruszak@gmail.com

Validating values length in prometheus query response. When there is no values returned invalid array index panic occurs.

Solution:

  • If there is no values in response return zero
  • If single value received return error

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Changelog has been updated

Fixes #

Signed-off-by: Magdalena Andruszak <mandruszak@gmail.com>
…ponse

Signed-off-by: Magdalena Andruszak <mandruszak@gmail.com>
Signed-off-by: Magdalena Andruszak <mandruszak@gmail.com>
@sosoftmandruszak sosoftmandruszak marked this pull request as ready for review November 9, 2021 15:31
@JorTurFer
Copy link
Member

/run-e2e prometheus*

@JorTurFer
Copy link
Member

LTGM!
The prometheus e2e tests are running, let's see the result :)

Thanks a ton for your contribution ❤️

@JorTurFer
Copy link
Member

/run-e2e prometheus.test*

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.

LGTM, thanks for the contribution @sosoftmandruszak!

@zroubalik zroubalik merged commit cc95674 into kedacore:main Nov 10, 2021
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.

3 participants