Skip to content

Commit

Permalink
fix: Remove overriding executionDeadline with maxDurationDeadline. Fixes
Browse files Browse the repository at this point in the history
 argoproj#13044

Signed-off-by: leesungbin <lee@sungbin.dev>
  • Loading branch information
leesungbin committed May 14, 2024
1 parent cd52436 commit 9a6c72d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,7 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus, retryStrate
if err != nil {
return nil, false, err
}
firstChildNode, err := woc.wf.Status.Nodes.Get(childNodeIds[0])
if err != nil {
return nil, false, err
}
maxDurationDeadline = firstChildNode.StartedAt.Add(maxDuration)
maxDurationDeadline = lastChildNode.FinishedAt.Add(maxDuration)
if time.Now().After(maxDurationDeadline) {
woc.log.Infoln("Max duration limit exceeded. Failing...")
return woc.markNodePhase(node.Name, lastChildNode.Phase, "Max duration limit exceeded"), true, nil
Expand Down Expand Up @@ -1050,9 +1046,6 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus, retryStrate
return woc.markNodePhase(node.Name, node.Phase, retryMessage), false, nil
}

woc.log.WithField("node", node.Name).Infof("node has maxDuration set, setting executionDeadline to: %s", humanize.Timestamp(maxDurationDeadline))
opts.executionDeadline = maxDurationDeadline

node = woc.markNodePhase(node.Name, node.Phase, "")
}

Expand Down

0 comments on commit 9a6c72d

Please sign in to comment.