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

MSSQL Scaler: Handle zero row query results #1637

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

cgillum
Copy link
Contributor

@cgillum cgillum commented Feb 28, 2021

Signed-off-by: Chris Gillum cgillum@microsoft.com

The MSSQL scaler would raise an error if a query result returned zero rows. This PR changes the behavior to instead return a metric value of 0 if a query results in zero rows.

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added N/A
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified) N/A
  • A PR is opened to update the documentation on (repo) (if applicable) N/A
  • Changelog has been updated I assume this is N/A since the mssql scaler hasn't been released yet

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Copy link
Member

@tomkerkhove tomkerkhove left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @cgillum!

@tomkerkhove
Copy link
Member

Would it be possible to add a test for this scenario?

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

@ahmelsayed ahmelsayed merged commit 9a55f9e into kedacore:main Mar 1, 2021
@ahmelsayed
Copy link
Contributor

Sorry I missed @tomkerkhove comment on the test. /cc @cgillum

@tomkerkhove
Copy link
Member

No problem, was thinking out Loud anyway!

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.

4 participants