diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index 140385a68b9d..55b3e822de8b 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -741,7 +741,7 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus, retryStrate if err != nil { return nil, false, err } - if *retryStrategyBackoffFactor > 0 { + if retryStrategyBackoffFactor != nil && *retryStrategyBackoffFactor > 0 { // Formula: timeToWait = duration * factor^retry_number // Note that timeToWait should equal to duration for the first retry attempt. timeToWait = baseDuration * time.Duration(math.Pow(float64(*retryStrategyBackoffFactor), float64(len(node.Children)-1))) @@ -797,7 +797,7 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus, retryStrate if err != nil { return nil, false, err } - if retryStrategy.Limit != nil && int32(len(node.Children)) > *limit { + if retryStrategy.Limit != nil && limit != nil && int32(len(node.Children)) > *limit { woc.log.Infoln("No more retries left. Failing...") return woc.markNodePhase(node.Name, lastChildNode.Phase, "No more retries left"), true, nil } diff --git a/workflow/validate/validate.go b/workflow/validate/validate.go index 4f86894ad968..722d9f9a0699 100644 --- a/workflow/validate/validate.go +++ b/workflow/validate/validate.go @@ -708,7 +708,7 @@ func (ctx *templateValidationCtx) validateLeaf(scope map[string]interface{}, tmp if !intstr.IsValidIntOrArgoVariable(tmpl.ActiveDeadlineSeconds) { return errors.Errorf(errors.CodeBadRequest, "templates.%s.activeDeadlineSeconds must be a positive integer > 0 or an argo variable", tmpl.Name) } - if i, err := intstr.Int(tmpl.ActiveDeadlineSeconds); err == nil && *i < 0 { + if i, err := intstr.Int(tmpl.ActiveDeadlineSeconds); err == nil && i != nil && *i < 0 { return errors.Errorf(errors.CodeBadRequest, "templates.%s.activeDeadlineSeconds must be a positive integer > 0 or an argo variable", tmpl.Name) } }