Commit 5d1eedd1 authored by Brian's avatar Brian Committed by GitHub

Merge pull request #1380 from fibonacci1729/fix/1333

fix(1333): cannot delete release in failed state
parents bb2511a4 264e30dd
......@@ -813,11 +813,17 @@ func (s *releaseServer) UninstallRelease(c ctx.Context, req *services.UninstallR
return nil, errMissingRelease
}
rel, err := s.env.Releases.Deployed(req.Name)
rels, err := s.env.Releases.History(req.Name)
if err != nil {
log.Printf("uninstall: Release not loaded: %s", req.Name)
return nil, err
}
if len(rels) < 1 {
return nil, errMissingRelease
}
relutil.SortByRevision(rels)
rel := rels[len(rels)-1]
// TODO: Are there any cases where we want to force a delete even if it's
// already marked deleted?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment