-
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
Scaling Modifiers formula ambiguous behavior #5074
Comments
@gauron99 PTAL 🙏 |
hey @danialgood thanks for letting us know! It looks like this is a mistake on my end. Ive updated the docs here |
So for now Ive updated the docs. I recognize that having to specify float is perhaps less intuitive then using ints - especially when you can mix the two in different cases. So an idea is to perhaps convert all necessary ints to floats before compiling to keep the I will work on this |
Great! I also noticed that expr documentation under AsFloat64 explicitly mentions that:
I didn't check out expr source code but might be an issue on their end. |
Expr package returns |
As the documentation is already fixed, I close the issue |
Report
It seems that since
expr.AsFloat64()
is used while compiling the formula, all possible outputs of the formula should be float.Currently the examples provided in the documentation regarding ternary conditions are using int values. If having the value always as float is intended (which i guess it is) then doc should be revised to use float values otherwise the code should be changed.
Expected Behavior
examples provided in the docs to work
Actual Behavior
admissions webhook denying validation :
Error from server (Forbidden): error when creating : admission webhook "vscaledobject.kb.io" denied the request: error validating formula in ScalingModifiers expected float64, but got interface {}
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.12.0
Kubernetes Version
1.27
Platform
Any
Scaler Details
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: