Closed nappelson closed 1 month ago
I think I have found the bug...
Essentially, requestScaleLoop
is being called with the old scaledJob
object. The conditions haven't been updated yet here - https://github.com/kedacore/keda/blob/54b05f3fb7ab6aed4aea5f6765eca4c465465619/controllers/keda/scaledjob_controller.go#L132
requestScaleLoop
needs to be called after we call setStatusConditions
.
I'm happy to fix this in https://github.com/kedacore/keda/issues/5215 or have two separate PRs. What would the maintainers prefer?
@nappelson thanks! Yes, please use 2 different PRs
I think I have found the bug...
Essentially,
requestScaleLoop
is being called with the oldscaledJob
object. The conditions haven't been updated yet here -
requestScaleLoop
needs to be called after we callsetStatusConditions
.I'm happy to fix this in #5215 or have two separate PRs. What would the maintainers prefer?
Actually, this doesn't appear to be "the bug". The reason why is because ScaledObjects call requestScaleLoop
before SetStatusConditions
as well...
I'm wondering if this is due to how the respective scale_executors
are implemented for ScaledObjects and ScaledJobs and if there is a bug in the executor for jobs.
Yeah, looking briefly at the code. We should probalby store the paused condition right away, it is a special case most likely. For the other conditions it makes sense to way for the result of requestScaleLoop()
or another functions/validations.
Or do you see an easy way how we can handle this in the executor? I haven't seen the code for some time, so don't remember anything 😄 Will try to dig in more later on.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity.
This issue has been automatically closed due to inactivity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity.
Report
When I set the
ScaledJob
paused annotation to TrueINFO ScaledJob is paused, stopping scaling loop.