Open skonto opened 3 months ago
Attention: Patch coverage is 21.21212%
with 26 lines
in your changes missing coverage. Please review.
Project coverage is 84.60%. Comparing base (
62ce45c
) to head (248d6e8
). Report is 144 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
error: the server doesn't have a resource type "ksvc"
/retest
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: skonto Once this PR has been reviewed and has the lgtm label, please ask for approval from dprotaso. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
@dprotaso gentle ping.
@dprotaso gentle ping.
This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen
. Mark as fresh by adding the
comment /remove-lifecycle stale
.
/remove-lifecycle stale
Fixes #14157
Proposed Changes
Replaces https://github.com/knative/serving/pull/14835
Adds pod diagnostics as it was pending here, I am wondering what it is needed to remove
activationTimeoutBuffer
.The idea is to mark the revision with resourcesAvailable=false and pa with ScaleTargetInitialized=false just before we apply scaling down to zero and after we have timedout and we failed the activation here. This would trigger the following condition in the revision lifecycle and pa status propagation:
if !ps.IsScaleTargetInitialized() && !resUnavailable && ps.ServiceName != "" {
A revision with no resources available will be set to ready false (due to its condSet) and that will propagate the condition up to the ksvc.Tested with:
{ "apiVersion": "v1", "items": [ { "apiVersion": "serving.knative.dev/v1", "kind": "Service", "metadata": { "annotations": { .... }, "status": { "address": { "url": "http://hello.default.svc.cluster.local" }, "conditions": [ { "lastTransitionTime": "2024-06-12T13:02:06Z", "message": "Revision \"hello-00001\" failed with message: Initial scale was never achieved.", "reason": "RevisionFailed", "status": "False", "type": "ConfigurationsReady" }, { "lastTransitionTime": "2024-06-12T13:02:05Z", "message": "Revision \"hello-00001\" failed to become ready.", "reason": "RevisionMissing", "status": "False", "type": "Ready" }, { "lastTransitionTime": "2024-06-12T13:02:05Z", "message": "Revision \"hello-00001\" failed to become ready.", "reason": "RevisionMissing", "status": "False", "type": "RoutesReady" } ], } } { "apiVersion": "v1", "items": [ { "apiVersion": "serving.knative.dev/v1", "kind": "Revision", "metadata": { "annotations": { "serving.knative.dev/creator": "minikube-user", "serving.knative.dev/progress-deadline": "45s", "serving.knative.dev/routes": "hello", "serving.knative.dev/routingStateModified": "2024-06-12T12:57:33Z" }, ...
... } { "apiVersion": "v1", "items": [ { "apiVersion": "serving.knative.dev/v1", "kind": "Configuration", "metadata": { ... "name": "hello", "namespace": "default", ... "status": { "conditions": [ { "lastTransitionTime": "2024-06-12T13:02:06Z", "message": "Revision \"hello-00001\" failed with message: Initial scale was never achieved.", "reason": "RevisionFailed", "status": "False", "type": "Ready" } ], ... } { "apiVersion": "v1", "items": [ { "apiVersion": "autoscaling.internal.knative.dev/v1alpha1", "kind": "PodAutoscaler",
... "spec": { "protocolType": "http1", "reachability": "Reachable", "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "hello-00001-deployment" } }, "status": { "actualScale": 0, "conditions": [ { "lastTransitionTime": "2024-06-12T13:02:05Z", "message": "The target is not receiving traffic.", "reason": "NoTraffic", "status": "False", "type": "Active" }, { "lastTransitionTime": "2024-06-12T13:02:05Z", "message": "The target is not receiving traffic.", "reason": "NoTraffic", "status": "False", "type": "Ready" }, { "lastTransitionTime": "2024-06-12T12:58:51Z", "message": "K8s Service is not ready", "reason": "NotReady", "status": "Unknown", "type": "SKSReady" }, { "desiredScale": 0, "metricsServiceName": "hello-00001-private", "observedGeneration": 1, "serviceName": "hello-00001" } } ], }