{"record":{"id":"ca85a5550e632621","repo":"GoogleContainerTools/skaffold","slug":"statuscheck-user-cancelled","errorCode":"STATUSCHECK_USER_CANCELLED","errorMessage":"%d/%d deployment(s) status check cancelled","messagePattern":"(.+?)/(.+?) deployment\\(s\\) status check cancelled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/skaffold/kubernetes/status/status_check.go","lineNumber":446,"sourceCode":"\t\t\t// immediately rather than waiting for for statusCheckDeadlineSeconds\n\t\t\t// TODO: https://github.com/GoogleContainerTools/skaffold/pull/4591\n\t\t\tif r.HasEncounteredUnrecoverableError() {\n\t\t\t\tif cfg.StatusCheckTolerateFailures() {\n\t\t\t\t\t// increase poll duration to reduce issues seen with kubectl/cluster becoming unresponsive with frequent requests\n\t\t\t\t\t// exponential backoff was considered but seemed to be less effective than one large increase in my testing.\n\t\t\t\t\tticker = time.NewTicker(pollDuration * 10)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tr.MarkComplete()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc getSkaffoldDeployStatus(ctx context.Context, c *counter, sc proto.StatusCode) (proto.StatusCode, error) {\n\tif c.total == int(c.cancelled) && c.total > 0 {\n\t\terr := fmt.Errorf(\"%d/%d deployment(s) status check cancelled\", c.cancelled, c.total)\n\t\treturn proto.StatusCode_STATUSCHECK_USER_CANCELLED, err\n\t}\n\t// return success if no failures find.\n\tif c.failed == 0 {\n\t\treturn proto.StatusCode_STATUSCHECK_SUCCESS, nil\n\t}\n\t// construct an error message and return appropriate error code\n\terr := fmt.Errorf(\"%d/%d deployment(s) failed\", c.failed, c.total)\n\tif sc == proto.StatusCode_STATUSCHECK_SUCCESS || sc == 0 {\n\t\tlog.Entry(ctx).Debugf(\"found statuscode %s. setting skaffold deploy status to STATUSCHECK_INTERNAL_ERROR.\", sc)\n\t\treturn proto.StatusCode_STATUSCHECK_INTERNAL_ERROR, err\n\t}\n\tlog.Entry(ctx).Debugf(\"setting skaffold deploy status to %s.\", sc)\n\treturn sc, err\n}\n\nfunc getDeadline(d int) time.Duration {\n\tif d > 0 {","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/status/status_check.go#L428-L464","documentation":"Skaffold's Kubernetes status check counts deployments whose status checks were cancelled (usually by user interruption via Ctrl-C or context cancellation). When every deployment being watched has been cancelled and at least one existed, getSkaffoldDeployStatus reports STATUSCHECK_USER_CANCELLED with this message. It signals that no deployment actually reached a final health verdict because the wait was aborted.","triggerScenarios":"Running `skaffold deploy`/`dev`/`run` with deploy.statusCheckDeadlineSeconds configured, then pressing Ctrl-C (SIGINT) or having the context cancelled while all deployment status checks are still pending, so c.cancelled == c.total > 0.","commonSituations":"User interrupts a slow rollout; CI job timeout kills skaffold; kubectl context is slow because the cluster's deployments take minutes to become available and the user gives up before any check resolves.","solutions":["Re-run the deploy and let the status check complete, or increase deploy.statusCheckDeadlineSeconds if the rollout legitimately needs more time","If the interrupt was intentional, treat this as expected cancellation — check `kubectl rollout status` manually to confirm deployment health","Verify the cluster is reachable and deployments are progressing (kubectl get deployments) so future checks finish before you cancel"],"exampleFix":"// before (skaffold.yaml)\ndeploy:\n  statusCheckDeadlineSeconds: 30\n// after\ndeploy:\n  statusCheckDeadlineSeconds: 600","handlingStrategy":"validation","validationCode":"// before waiting, ensure the deployment is progressing fast enough to finish inside the deadline\nout, err := exec.Command(\"kubectl\", \"rollout\", \"status\", \"deployment/my-app\", \"--timeout=60s\").CombinedOutput()\nif err != nil {\n    log.Fatalf(\"deployment not healthy, status check would be cancelled/fail: %s\", out)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set a realistic deploy.statusCheckDeadlineSeconds for slow rollouts","Avoid interrupting deploys in CI; rely on the deadline instead of manual Ctrl-C","Pre-check rollout health with kubectl rollout status before running skaffold","Monitor signal handling expectations in scripts wrapping skaffold"],"tags":["kubernetes","status-check","user-cancelled"],"backgroundTag":"deployment-status-check-cancelled","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}