{"record":{"id":"db9d6218c7ca998e","repo":"kubernetes/kops","slug":"not-all-objects-were-applied","errorCode":null,"errorMessage":"not all objects were applied","messagePattern":"not all objects were applied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/pkg/channels/clientapplier.go","lineNumber":80,"sourceCode":"\t}\n\n\tvar applyableObjects []applyset.ApplyableObject\n\tfor _, object := range objects {\n\t\tapplyableObjects = append(applyableObjects, object)\n\t}\n\tif err := s.SetDesiredObjects(applyableObjects); err != nil {\n\t\treturn err\n\t}\n\n\tresults, err := s.ApplyOnce(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to apply objects: %w\", err)\n\t}\n\n\t// TODO: Implement pruning\n\n\tif !results.AllApplied() {\n\t\treturn fmt.Errorf(\"not all objects were applied\")\n\t}\n\n\t// TODO: Check object health status\n\tif !results.AllHealthy() {\n\t\treturn fmt.Errorf(\"not all objects were healthy\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":62,"sourceCodeEnd":90,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/channels/clientapplier.go#L62-L90","documentation":"ClientApplier.Apply checks the applyset results after ApplyOnce: every object must report applied. If any object did not reach the applied state (even without a hard error from ApplyOnce), this error is returned. It means the manifest was only partially or not at all materialized on the cluster.","triggerScenarios":"results.AllApplied() returning false after ApplyOnce — one or more objects in the manifest failed to apply without the overall apply returning a wrapped error.","commonSituations":"Partial applies where some objects hit per-object errors; race conditions or webhook rejections on individual objects; flaky API server responses during a large manifest apply.","solutions":["Inspect applyset per-object results/logs to find which objects were not applied.","Re-run Apply — partial failures are often resolved by a retry.","Fix RBAC/validation issues reported for the specific failing objects.","Check API server and admission webhook logs for rejections during the apply."],"exampleFix":"// before\nif err := applier.Apply(ctx, manifest); err != nil { return err }\n// after\nif err := applier.Apply(ctx, manifest); err != nil {\n    if err.Error() == \"not all objects were applied\" {\n        return retryApplyWithBackoff(ctx, applier, manifest)\n    }\n    return err\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":"func isPartialApply(err error) bool {\n    return strings.Contains(err.Error(), \"not all objects were applied\")\n}","tryCatchPattern":"err := applier.Apply(ctx, manifest)\nif isPartialApply(err) {\n    return retry.Do(func() error { return applier.Apply(ctx, manifest) },\n        retry.Attempts(3), retry.Delay(time.Second))\n}","preventionTips":["Re-run Apply on partial failures — applies are idempotent.","Log per-object applyset results to identify failing objects.","Check API server/webhook logs for per-object rejections.","Avoid applying very large manifests in one shot if the API server is flaky."],"tags":["kubernetes","apply","applyset","partial-failure"],"backgroundTag":"kubernetes-apply-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}