{"record":{"id":"b67f950599ff8f7d","repo":"derailed/k9s","slug":"s-b67f95","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/dao/helm_history.go","lineNumber":169,"sourceCode":"\n\treturn clt.Run(n)\n}\n\n// Delete uninstall a Helm.\nfunc (h *HelmHistory) Delete(_ context.Context, path string, _ *metav1.DeletionPropagation, _ Grace) error {\n\tns, n := client.Namespaced(path)\n\tcfg, err := ensureHelmConfig(h.Client().Config().Flags(), ns)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tres, err := action.NewUninstall(cfg).Run(n)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif res != nil && res.Info != \"\" {\n\t\treturn fmt.Errorf(\"%s\", res.Info)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":151,"sourceCodeEnd":174,"githubUrl":"https://github.com/derailed/k9s/blob/2d3ccc6ba2ce98c3781bfc441bb3e884f072774f/internal/dao/helm_history.go#L151-L174","documentation":"Returned by HelmHistory.Delete after action.NewUninstall(cfg).Run(name) completes without a transport error but the UninstallResponse carries a non-empty Info string. Helm puts hook output and deletion notes in Info, so the DAO surfaces any informational payload as an error rather than swallowing it.","triggerScenarios":"Uninstalling a release whose pre/post-delete hooks emit output, or whose deletion leaves messages/warnings in res.Info — the run succeeds yet Info != \"\".","commonSituations":"Releases with pre-delete hooks (cert cleanup jobs, external deleters) that print messages; resources intentionally kept (CRDs, PVCs) noted by Helm; migrated Helm 2 releases carrying annotated info.","solutions":["Read the message and verify the outcome: check helm list / HelmHistory.List — the release is usually already gone","If Info only contains hook output, treat the returned error as informational in your caller instead of a failure","When the message mentions a failed hook, inspect hook job logs in the release namespace and clean up manually"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := h.Delete(ctx, path, nil, Grace{}); err != nil {\n    if remaining, lerr := h.List(ctx); lerr == nil && !releaseExists(remaining, name) {\n        // release is gone: downgrade to warning, err is informational hook output\n        slog.Warn(\"helm uninstall info\", slogs.Error, err)\n        return nil\n    }\n    return err\n}","preventionTips":["Treat any error text from uninstall as informational until helm list proves the release still exists","Pre-check hook definitions in release templates to anticipate messages","Automate cleanup verification with HelmHistory.List instead of trusting Delete's return alone"],"tags":["helm","uninstall","hooks"],"backgroundTag":null,"analyzedSha":"2d3ccc6ba2ce98c3781bfc441bb3e884f072774f","analyzedAt":"2026-08-15T16:09:14.432Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}