Skip to content

Don't mark idle revisions as ProgressDeadlineExceeded - #16697

Open
Anjali-Chauhan1 wants to merge 1 commit into
knative:mainfrom
Anjali-Chauhan1:fix-16694-progress-deadline-race
Open

Anjali-Chauhan1 wants to merge 1 commit into
knative:mainfrom
Anjali-Chauhan1:fix-16694-progress-deadline-race

Conversation

@Anjali-Chauhan1

Copy link
Copy Markdown

Fixes #16694

Proposed Changes

  • PropagateAutoscalerStatus now only marks a revision ResourcesAvailable=False / ProgressDeadlineExceeded ("Initial scale was never achieved") when the PodAutoscaler is inactive with reason TimedOut. A PA that is inactive because it has no traffic (NoTraffic) is the normal state for an idle revision, and when its scale target is not yet initialized (e.g. initial-scale 0) it no longer causes a spurious failure seconds after creation.
  • The KPA now keeps the TimedOut reason on later reconciles until the PA activates again. Before this change it rewrote TimedOut to NoTraffic on the next pass, which would silently clear a genuine progress-deadline failure on the revision (the Deployment reports Ready once scaled to zero, so the failure had to be re-derived from the PA on every reconcile).
  • Adds ReasonTimedOut / ReasonNoTraffic constants to autoscaling/v1alpha1, plus unit and table tests covering: idle (NoTraffic) revisions are not failed; TimedOut revisions fail and stay failed across reconciles; the KPA preserves TimedOut for desired scale 0 and -1.

Note: a revision whose activation times out now has its PA's Active/Ready reason remain TimedOut (instead of switching to NoTraffic) until it receives traffic again.

@knative-prow

knative-prow Bot commented Oct 2, 2026

Copy link
Copy Markdown

Welcome @Anjali-Chauhan1! It looks like this is your first PR to knative/serving 🎉

@knative-prow knative-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 2, 2026
@knative-prow

knative-prow Bot commented Oct 2, 2026

Copy link
Copy Markdown

Hi @Anjali-Chauhan1. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow
knative-prow Bot requested a review from dprotaso October 2, 2026 13:22
@knative-prow

knative-prow Bot commented Oct 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Anjali-Chauhan1
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow
knative-prow Bot requested a review from skonto October 2, 2026 13:22
A revision was marked ResourcesAvailable=False with reason
ProgressDeadlineExceeded ("Initial scale was never achieved") whenever its
PodAutoscaler was Ready=False with the scale target not yet initialized.
That state also occurs for a freshly created revision whose PA is merely
inactive because it has no traffic (e.g. initial-scale 0), so revisions
were spuriously failed seconds after creation and recovered later.

Only treat the PA as having missed its progress deadline when it reports
the TimedOut reason, which the KPA sets solely when activation times out.
To keep that signal reliable, the KPA now preserves TimedOut on subsequent
reconciles until the PA activates again, instead of rewriting it to
NoTraffic on the next pass, which would otherwise silently clear a genuine
failure on the revision.

Signed-off-by: Anjali-Chauhan1 <anjalichauhan1036@gmail.com>
@Anjali-Chauhan1
Anjali-Chauhan1 force-pushed the fix-16694-progress-deadline-race branch from 76eb87d to 05b7ca7 Compare October 2, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revision spuriously marked "Initial scale was never achieved" seconds after creation (since 1.21)

1 participant