Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
a3241469
Commit
a3241469
authored
Oct 11, 2016
by
Matt Butcher
Committed by
GitHub
Oct 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1323 from technosophos/fix/1305-mark-deleted-on-fail
fix(tiller): when delete fails, mark release as deleted
parents
7a5ee459
87ab6673
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
release_server.go
cmd/tiller/release_server.go
+11
-6
No files found.
cmd/tiller/release_server.go
View file @
a3241469
...
@@ -848,20 +848,20 @@ func (s *releaseServer) UninstallRelease(c ctx.Context, req *services.UninstallR
...
@@ -848,20 +848,20 @@ func (s *releaseServer) UninstallRelease(c ctx.Context, req *services.UninstallR
// We could instead just delete everything in no particular order.
// We could instead just delete everything in no particular order.
return
nil
,
err
return
nil
,
err
}
}
// Note: We could re-join these into one file and delete just that one. Or
//
we could collect errors (instead of bailing on the first error) and try
//
Collect the errors, and return them later.
// to delete as much as possible instead of failing at the first error.
es
:=
[]
string
{}
for
_
,
file
:=
range
files
{
for
_
,
file
:=
range
files
{
b
:=
bytes
.
NewBufferString
(
file
.
content
)
b
:=
bytes
.
NewBufferString
(
file
.
content
)
if
err
:=
s
.
env
.
KubeClient
.
Delete
(
rel
.
Namespace
,
b
);
err
!=
nil
{
if
err
:=
s
.
env
.
KubeClient
.
Delete
(
rel
.
Namespace
,
b
);
err
!=
nil
{
log
.
Printf
(
"uninstall: Failed deletion of %q: %s"
,
req
.
Name
,
err
)
log
.
Printf
(
"uninstall: Failed deletion of %q: %s"
,
req
.
Name
,
err
)
return
nil
,
err
es
=
append
(
es
,
err
.
Error
())
}
}
}
}
if
!
req
.
DisableHooks
{
if
!
req
.
DisableHooks
{
if
err
:=
s
.
execHook
(
rel
.
Hooks
,
rel
.
Name
,
rel
.
Namespace
,
postDelete
);
err
!=
nil
{
if
err
:=
s
.
execHook
(
rel
.
Hooks
,
rel
.
Name
,
rel
.
Namespace
,
postDelete
);
err
!=
nil
{
return
res
,
err
es
=
append
(
es
,
err
.
Error
())
}
}
}
}
...
@@ -875,7 +875,12 @@ func (s *releaseServer) UninstallRelease(c ctx.Context, req *services.UninstallR
...
@@ -875,7 +875,12 @@ func (s *releaseServer) UninstallRelease(c ctx.Context, req *services.UninstallR
}
}
}
}
return
res
,
nil
var
errs
error
if
len
(
es
)
>
0
{
errs
=
fmt
.
Errorf
(
"deletion error count %d: %s"
,
len
(
es
),
strings
.
Join
(
es
,
"; "
))
}
return
res
,
errs
}
}
// byName implements the sort.Interface for []*release.Release.
// byName implements the sort.Interface for []*release.Release.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment