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 29, 2022
1 parent 5c3e18c commit 7f8a156
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 @@ -485,6 +485,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 7f8a156

Please sign in to comment.