{"record":{"id":"2f3af5fa9e4f4edd","repo":"helm/helm","slug":"release-not-found","errorCode":null,"errorMessage":"release: not found","messagePattern":"release: not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/storage/driver/driver.go","lineNumber":29,"sourceCode":"distributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage driver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"helm.sh/helm/v4/pkg/release\"\n\trspb \"helm.sh/helm/v4/pkg/release/v1\"\n)\n\nvar (\n\t// ErrReleaseNotFound indicates that a release is not found.\n\tErrReleaseNotFound = errors.New(\"release: not found\")\n\t// ErrReleaseExists indicates that a release already exists.\n\tErrReleaseExists = errors.New(\"release: already exists\")\n\t// ErrInvalidKey indicates that a release key could not be parsed.\n\tErrInvalidKey = errors.New(\"release: invalid key\")\n\t// ErrNoDeployedReleases indicates that there are no releases with the given key in the deployed state\n\tErrNoDeployedReleases = errors.New(\"has no deployed releases\")\n)\n\n// StorageDriverError records an error and the release name that caused it\ntype StorageDriverError struct {\n\tReleaseName string\n\tErr         error\n}\n\nfunc (e *StorageDriverError) Error() string {\n\treturn fmt.Sprintf(\"%q %s\", e.ReleaseName, e.Err.Error())\n}\n","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/storage/driver/driver.go#L11-L47","documentation":"ErrReleaseNotFound is the storage drivers' sentinel (secret, configmap, sql, memory) for a Get/Update on a release key that does not exist in the backend. It typically reaches users wrapped in a StorageDriverError carrying the release name.","triggerScenarios":"driver.Get(\"sh.helm.release.v1.missing.v1\") for a release never installed or already uninstalled; querying the wrong namespace (storage is namespace-scoped); using a different HELM_DRIVER than the one the release was stored with.","commonSituations":"helm upgrade --install where the lookup assumes an existing release; HELM_NAMESPACE mismatch between install and later commands; release records (secrets) deleted manually in the cluster; switching storage backends (secret -> sql) without migrating releases.","solutions":["Run `helm list --all-namespaces -a` to find where the release actually lives, then use that namespace/driver","Make sure HELM_DRIVER and --namespace match the ones used at install time","If the record was truly removed, treat it as a fresh install (Create path / helm install), not an upgrade"],"exampleFix":"# before\nhelm upgrade myapp ./chart -n prod   # release not found\n# after\nhelm list -A | grep myapp            # locate actual namespace\nhelm upgrade --install myapp ./chart -n <real-namespace>","handlingStrategy":"try-catch","validationCode":"rel, err := cfg.Releases.Last(name)\nif err != nil && errors.Is(err, driver.ErrReleaseNotFound) {\n    // fresh install path\n}","typeGuard":"func releaseExists(cfg *action.Configuration, name string) bool {\n    _, err := cfg.Releases.Last(name)\n    return err == nil || !errors.Is(err, driver.ErrReleaseNotFound)\n}","tryCatchPattern":"if _, err := drv.Get(key); err != nil {\n    if errors.Is(err, driver.ErrReleaseNotFound) {\n        // take the create/install path, or fix namespace/driver config\n    }\n}","preventionTips":["Use helm list -A to confirm release location before operating on it","Pin HELM_DRIVER and --namespace consistently in all environments","Use upgrade --install (create-or-update) instead of assuming the release exists"],"tags":["storage","release","driver","namespace"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}