Skip to content

Commit

Permalink
fix(1333): cannot delete release in failed state
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci1729 committed Oct 17, 2016
1 parent 70b29a4 commit 264e30d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/tiller/release_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 264e30d

Please sign in to comment.