-
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
fix: use metricName from GetMetricsSpec in ScaledJobs instead of queueLength
#3046
Conversation
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e external* |
Signed-off-by: Jorge Turrado <[email protected]>
… always Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e external* |
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e external* |
queueLength
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e external* |
queueLength
queueLength
/run-e2e |
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e |
/run-e2e |
BTW, @zroubalik and/or @ahmelsayed , I'd like to have your review too |
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[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, thanks a lot!
/run-e2e |
/run-e2e |
I'd say that the fail was because of race conditions due to running the "main" branch e2e tests at the same time. |
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
queueLength
queueLength
Signed-off-by: Jorge Turrado [email protected]
After introducing the unique metric names using the prefix and the solution for external scaler, it fails in case of ScaledJobs because we use
queueLength
as a metric name in case of ScaledJob (ignoring the given name from the external scaler) and this metric doesn't have the prefix.This PR modifies the behaviour to use the metric spec given from GetMetricSpec instead of the hardcoded value, Using this approach all the code in the scaler that work for ScaledObject work for ScaledJob because now they follow the same behavior (from scaler internal pov).
I have added also an e2e with ScaledJob and external scaler to ensure the behaviour in the future and other small improvements
Checklist
Fixes # #3032