-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Detect Inf before casting float to int #3644
Comments
It would be greatly appreciated if the fix could be backported to v2.7 as we (Grafana Labs, who ❤️ KEDA!) are currently staying one minor version behind for stability. |
hey, |
For the moment, we don't backport changes, each release is distributed as it is, sorry :( |
Another question, are you open to be listed as KEDA users 😄 ? |
@kedacore/keda-core-contributors ? 🔝 🔝 |
|
Report
This line:
keda/pkg/scalers/prometheus_scaler.go
Line 310 in 4e72030
is called on output from Prometheus, which may be
+Inf
.It calls
keda/pkg/scalers/scaler.go
Line 189 in 4e72030
where the value is cast to an int. This does not go well; it might result in a number like -9223372036854776000.
Expected Behavior
Not generate bogus values. Maybe treat it the same as "null", handled a few lines earlier?
Actual Behavior
Steps to Reproduce the Problem
Sorry I don't know much about running Keda; I'm debugging someone else's problem.
For the purpose of demonstrating the problem, you can use PromQL
1/0
, that returns+Inf
.Logs from KEDA operator
No response
KEDA Version
2.7.1
Kubernetes Version
1.22
Platform
Google Cloud
Scaler Details
HPA
Anything else?
No response
The text was updated successfully, but these errors were encountered: