Skip to content

Commit 688193f

Browse files
committed
[core] Do not fail env deployment on cleanup issues
1 parent 362cfd6 commit 688193f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/environment/transition_deploy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (t DeployTransition) do(env *Environment) (err error) {
9191
if localErr != nil {
9292
log.WithField("partition", env.Id().String()).
9393
Warnf("[cleanup binary] execution unsuccessful on %s : %s\n", flp, localErr.Error())
94-
scriptErrors = multierror.Append(scriptErrors, localErr)
94+
scriptErrors = multierror.Append(scriptErrors, fmt.Errorf("cleanup unsuccessful on %s: %w", flp, localErr))
9595
} else {
9696
log.WithField("partition", env.Id().String()).
9797
Infof("[cleanup binary] execution successful on %s\n", flp)
@@ -195,6 +195,7 @@ func (t DeployTransition) do(env *Environment) (err error) {
195195
}
196196
if err != nil {
197197
log.Warnf("pre-deployment cleanup, %s", err.Error())
198+
err = nil // we don't want to fail the deployment because of pre-deploy cleanup issues
198199
}
199200

200201
// We set all callRoles to ACTIVE right now, because there's no task activation for them.

0 commit comments

Comments
 (0)