-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ensure old revision stays Unreachable after Knative Service update #14287
Conversation
Directly check the ServerlessService Ready condition instead of its IsReady condition so that we do not see a temporary false when its generation is changing. Signed-off-by: Sascha Schwarze <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @SaschaSchwarze0. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
/ok-to-test |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #14287 +/- ##
==========================================
- Coverage 86.26% 86.23% -0.04%
==========================================
Files 195 195
Lines 14702 14703 +1
==========================================
- Hits 12683 12679 -4
- Misses 1719 1723 +4
- Partials 300 301 +1
☔ View full report in Codecov by Sentry. |
/cc @dprotaso |
So I was thinking about simplifying the circular logic in the revision reconciler using an approach where reachability only flows downward and isn't influenced by the child resources. I have a WIP here - https://github.com/knative/serving/pull/14309/files#diff-7ad1d76110f486046dc682be17600b22d4958b12160852c9f4040ce32f5d8dfc Surprising all the e2e tests pass without any changes. I think this is because after reachability to the spec we simplified things years later by adding a ScaleTargetInitialized condition. I'm going to test your specific scenario with those changes. |
Closing in favour of #14309 |
Fixes #14115 by changing how the Knative PodAutoscaler detects whether a ServerlessService is ready.
Before my change, it called the
IsReady
function of the ServerlessService which is returning false if the generation is different in metadata and status.Due to it temporarily not being ready, the PodAutoscaler is set to SKSReady=Unknown here.
The PodAutoscaler then goes Ready=False because SKSReady is part of Ready here.
The revision inherits the PodAutoscaler status and sets Active=Unknown here.
This causes the PodAutoscaler's Reachability to be set to Unknown here.
Once the PodAutoscaler is not anymore marked as unreachable, the scaling boundary will be set to the min value from the annotation again here. This will cause a revision that is being not needed anymore to scale up again for a short moment which causes additional pods.
I am changing the logic in the KPA reconciler to directly look at the Ready condition of the ServerlessService instead of calling its IsReady function.
I need somebody with experience in this area to carefully assess if there are side-effects.
/kind bug
Release Note