{"record":{"id":"721bb872cfd99097","repo":"kubernetes/kops","slug":"kubernetespath-removeall-not-supported","errorCode":null,"errorMessage":"KubernetesPath::RemoveAll not supported","messagePattern":"KubernetesPath::RemoveAll not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/k8sfs.go","lineNumber":75,"sourceCode":"\nfunc (p *KubernetesPath) Host() string {\n\treturn p.host\n}\n\nfunc (p *KubernetesPath) Key() string {\n\treturn p.key\n}\n\nfunc (p *KubernetesPath) String() string {\n\treturn p.Path()\n}\n\nfunc (p *KubernetesPath) Remove(ctx context.Context) error {\n\treturn fmt.Errorf(\"KubernetesPath::Remove not supported\")\n}\n\nfunc (p *KubernetesPath) RemoveAll(ctx context.Context) error {\n\treturn fmt.Errorf(\"KubernetesPath::RemoveAll not supported\")\n}\n\nfunc (p *KubernetesPath) RemoveAllVersions(ctx context.Context) error {\n\treturn p.Remove(ctx)\n}\n\nfunc (p *KubernetesPath) Join(relativePath ...string) Path {\n\targs := []string{p.key}\n\targs = append(args, relativePath...)\n\tjoined := path.Join(args...)\n\treturn &KubernetesPath{\n\t\tk8sContext: p.k8sContext,\n\t\thost:       p.host,\n\t\tkey:        joined,\n\t}\n}\n\nfunc (p *KubernetesPath) WriteFile(ctx context.Context, data io.ReadSeeker, acl ACL) error {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/k8sfs.go#L57-L93","documentation":"Hard guard: recursive removal is not implemented for k8s:// VFS paths, so KubernetesPath.RemoveAll unconditionally returns this error. The Kubernetes API has no recursive-delete semantic over the VFS key space, so any caller that walks a k8s tree and tries to purge it via VFS always fails here.","triggerScenarios":"Thrown at util/pkg/vfs/k8sfs.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enumerate objects via the Kubernetes API and delete them individually with client-go","Avoid routing delete operations at k8s:// paths; guard callers on the path scheme"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}