Skip to content

Commit

Permalink
fix: add nil check for retryStrategy.Limit in deadline check. Fixes #…
Browse files Browse the repository at this point in the history
…8990 (#8991)

Signed-off-by: Dillen Padhiar <[email protected]>
  • Loading branch information
dpadhiar authored and sarabala1979 committed Jun 20, 2022
1 parent 2b428be commit 72e0c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus, retryStrate
}

// See if we have waited past the deadline
if time.Now().Before(waitingDeadline) && int32(len(node.Children)) <= retryStrategy.Limit.IntVal {
if time.Now().Before(waitingDeadline) && retryStrategy.Limit != nil && int32(len(node.Children)) <= retryStrategy.Limit.IntVal {
woc.requeueAfter(timeToWait)
retryMessage := fmt.Sprintf("Backoff for %s", humanize.Duration(timeToWait))
return woc.markNodePhase(node.Name, node.Phase, retryMessage), false, nil
Expand Down

0 comments on commit 72e0c6f

Please sign in to comment.