Skip to content

Commit

Permalink
Handle the scenario where only deferPhase is failed
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksinghggits committed Mar 24, 2022
1 parent 530048e commit 7d768e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ func (c *Controller) executeDeferPhase(ctx context.Context,
var rf func(*crv1alpha1.ActionSet) error
if err != nil {
rf = func(as *crv1alpha1.ActionSet) error {
as.Status.State = crv1alpha1.StateFailed
as.Status.Error = crv1alpha1.Error{
Message: err.Error(),
}
as.Status.Actions[aIDX].DeferPhase.State = crv1alpha1.StateFailed
return nil
}
Expand Down

0 comments on commit 7d768e7

Please sign in to comment.