Registry Mirror
Skip to content

Conversation

@higgsboson1710

Copy link
Copy Markdown

Fixes: #16698

When a Knative revision fails, the following state can occur in the Configuration:

  • LatestReadyRevisionName = "rev-v2" (the now-failed revision)
  • LatestCreatedRevisionName = "rev-v3" (a new revision being deployed)
  • Ready = Unknown (since LRR != LCR)

In this state, the Route controller's addConfigurationTarget would:

  1. Find LRR = "rev-v2" (non-empty, so NOT taking the errUnreadyConfiguration path)
  2. Fetch rev-v2 from lister → find it is NOT ready (failed)
  3. Call errUnreadyRevision(rev-v2) → isFailure = true (since rev.Ready = False)
  4. Call MarkRevisionFailed on Route → Route.AllTrafficAssigned = False (permanent)

This caused the Route to become permanently stuck even when a new revision
(rev-v3) is actively being deployed to replace the failed one. The Route would
not automatically recover — users had to manually delete the failed Revision
to force a re-reconciliation.

The fix: in addConfigurationTarget, before calling errUnreadyRevision when the
LRR revision is found to be failed, check if LCR != LRR. If they differ, a new
revision is in flight, so we should return errUnreadyConfiguration instead —
which produces isFailure=false and lets the Route retry gracefully.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: higgsboson1710 / name: Abhinav (aa28af5)

@knative-prow

knative-prow Bot commented Oct 10, 2026

Copy link
Copy Markdown

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

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

knative-prow Bot commented Oct 10, 2026

Copy link
Copy Markdown

Hi @higgsboson1710. 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.

@dsimansk

dsimansk commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@knative-prow knative-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.26%. Comparing base (f1fb43e) to head (9fc8747).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16702      +/-   ##
==========================================
+ Coverage   80.25%   80.26%   +0.01%     
==========================================
  Files         217      217              
  Lines       13701    13703       +2     
==========================================
+ Hits        10996    10999       +3     
  Misses       2334     2334              
+ Partials      371      370       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@knative-prow

knative-prow Bot commented Nov 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: higgsboson1710
Once this PR has been reviewed and has the lgtm label, please assign evankanderson 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

@dprotaso

Copy link
Copy Markdown
Member

/hold

@knative-prow knative-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2026
@dprotaso

Copy link
Copy Markdown
Member

This caused the Route to become permanently stuck even when a new revision
(rev-v3) is actively being deployed to replace the failed one.

I couldn't reproduce this. I've reached out on the issue to get a confirmation on how to reproduce this reliably

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Knative Deployment Remains Stuck After Failed Revision Until Revision Is Deleted

3 participants