-
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
Graphite scaler should use latest datapoint, not earliest, returned #2365
Graphite scaler should use latest datapoint, not earliest, returned #2365
Conversation
Signed-off-by: Brandon Pinske <[email protected]>
bcf752b
to
ca8a90b
Compare
Hi!, |
Signed-off-by: Brandon Pinske <[email protected]>
Here you can see the graphite server response returns values in order of oldest to latest. With the final element of the response array being the most up-to-date timestamp. Graphite's scaler should be acting on the final element of the response array, not the first. https://graphite-api.readthedocs.io/en/latest/api.html#json |
/run-e2e graphite.test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only small nit
Thanks for the contribution :)
Signed-off-by: Brandon Pinske <[email protected]>
Signed-off-by: Brandon Pinske <[email protected]>
I'm going to be a pain @bpinske, but would you mind updating the PR description to be more complete please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generaly looking good, one Q.
Signed-off-by: Brandon Pinske <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…edacore#2365) Signed-off-by: Brandon Pinske <[email protected]>
…edacore#2365) Signed-off-by: Brandon Pinske <[email protected]>
Graphite query responses return values in order of oldest to latest. With the final element of the response array being the most up-to-date timestamp. Graphite's scaler should be on the most recent datapoint, not on data potentially hours old.
https://graphite-api.readthedocs.io/en/latest/api.html#json
https://github.com/kedacore/keda/blob/main/pkg/scalers/graphite_scaler.go#L197
Checklist
Fixes #2366