helm uninstall: erroneous exit code if no release found
If a release was not previously installed and helm uninstall release-name is run the following error occurs:
Error: uninstall: Release not loaded: release-name: release: not found
That's fine and having read your design considerations I understand the reasoning behind the default behavior and it should not be altered.
Looking at it from the automation perspective I would propose it as useful to add a flag similar to the helm upgrade --install flag. It would accept release: not found as successful uninstallation, as technically it was successfully uninstalled.
Currently running the command in a CI pipeline errors if e.g. a previous installation wasn't successful and everything is teared down.
Currently one has to use || true but this has the drawback that it hides all errors, even those that might really happen during an uninstall.
I have searched for similar issues but haven't found one, sorry if I might have overlooked it.
Output of helm version: version.BuildInfo{Version:"v3.5.3", GitCommit:"041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622", GitTreeState:"dirty", GoVersion:"go1.15.8"}
It is useful, I have implemented it.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Has this option been added? the PR (https://github.com/helm/helm/pull/9689) seemed to be reviewed, changed according to suggestions but never approved and merged. Currently with conflicts.
This feature has been implemented otherwise?
no, not that I know
Hi, this would be useful to have
- 1 waiting for this
Agreed, this would be very useful!
same issue: https://github.com/helm/helm/issues/3352
same need please merge
Seems that is has been added to the documentation but not working yet...
https://helm.sh/docs/helm/helm_uninstall/
Fix has be merged in V3.13.0.