Skip to content

fix: lower log level for ScaledObject paused replicas transitioning state#7650

Open
aliaqel-stripe wants to merge 4 commits intokedacore:mainfrom
aliaqel-stripe:fix/paused-replicas-log-level
Open

fix: lower log level for ScaledObject paused replicas transitioning state#7650
aliaqel-stripe wants to merge 4 commits intokedacore:mainfrom
aliaqel-stripe:fix/paused-replicas-log-level

Conversation

@aliaqel-stripe
Copy link
Copy Markdown
Contributor

@aliaqel-stripe aliaqel-stripe commented Apr 13, 2026

When introducing the autoscaling.keda.sh/paused-replicas annotation on a ScaledObject, there is a brief window during the first reconciliation where the annotation is set but the PausedCondition status hasn't been committed yet. During this window, the controller was returning a non-nil error, causing:

  1. logger.Error(...) — error-level log spam on every reconciliation during a normal, expected pausing transition
  2. ReadyCondition=False with reason ScaledObjectCheckFailed — incorrectly marking the ScaledObject as unhealthy
  3. A Warning Kubernetes event — unnecessary noise in the event stream

Fix: log at info level and return nil so this expected transitional state is not treated as a failure.

Checklist

  • Tests have been added (if applicable)
  • Changelog has been updated and is aligned with our changelog requirements, only when the change impacts end users
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Wait for:

Fixes #6604

…tate

The "ScaledObject paused replicas are being scaled" message was returned
as an error, causing the controller to log it at error level and mark
the ScaledObject ReadyCondition=False. This is a transient, expected
state during the normal pausing transition and should not be treated
as an error.

Log at warning level and return nil so the ScaledObject is not
incorrectly marked as unhealthy during this transition.

Fixes kedacore#6604

Signed-off-by: Ali Aqel <aliaqel@stripe.com>
@aliaqel-stripe aliaqel-stripe requested a review from a team as a code owner April 13, 2026 16:43
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Apr 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@keda-automation keda-automation requested a review from a team April 13, 2026 16:43
@github-actions
Copy link
Copy Markdown

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

Copy link
Copy Markdown
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just would like to wait for #7664 to merge first

@rickbrouwer rickbrouwer added the waiting-on-other-pr All PR's that are waiting for an other PR which must be merged first label Apr 21, 2026
@wozniakjan wozniakjan added the Awaiting/2nd-approval This PR needs one more approval review label Apr 22, 2026
@keda-automation keda-automation requested a review from a team May 6, 2026 22:29
@JorTurFer JorTurFer enabled auto-merge (squash) May 7, 2026 10:41
@JorTurFer JorTurFer disabled auto-merge May 7, 2026 10:41
@rickbrouwer rickbrouwer added merge-conflict This PR has a merge conflict and removed Awaiting/2nd-approval This PR needs one more approval review waiting-on-other-pr All PR's that are waiting for an other PR which must be merged first labels May 7, 2026
@rickbrouwer
Copy link
Copy Markdown
Member

Related PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict This PR has a merge conflict

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lower logging level of ScaledObject paused replicas are being scaled error log

4 participants