Handle NaN result from Prometheus#7522
Conversation
Signed-off-by: Andrew Hall <[email protected]>
Signed-off-by: Andrew Hall <[email protected]>
|
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:
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. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Signed-off-by: Andrew Hall <[email protected]>
Signed-off-by: Andrew Hall <[email protected]>
|
/run-e2e prometheus |
Co-authored-by: Rick Brouwer <[email protected]> Signed-off-by: Andrew Hall <[email protected]>
|
/run-e2e prometheus |
|
/run-e2e prometheus |
This PR seeks to address #7475.
When a Prometheus query is used for obtaining a scaler value the existing code will handle an Inf value being returned. However, if Prometheus returns a NaN this is not explicitly handled.
As a consequence, the NaN is parsed into a float64 and passed back for use in further evaluations.
This PR simply adds an additional test to ensure that NaN and Inf responses are handled in the same manner. This can result in arithmetic overflows and bogus
keda_scaler_metrics_valuebeing calculated.Checklist
make generate-scalers-schemahas been run to update any outdated generated filesFixes #7475