Skip to content

Commit

Permalink
fix: set daemon pod failed when with a non-zero status. Fixes:argopro…
Browse files Browse the repository at this point in the history
…j#12911

Signed-off-by: shuangkun <tsk2013uestc@163.com>
  • Loading branch information
shuangkun committed May 9, 2024
1 parent e3b0bb6 commit 0eebc2d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1333,14 +1333,8 @@ func (woc *wfOperationCtx) assessNodeStatus(pod *apiv1.Pod, old *wfv1.NodeStatus
new.Phase = wfv1.NodeSucceeded
new.Daemoned = nil
case apiv1.PodFailed:
// ignore pod failure for daemoned steps
if tmpl != nil && tmpl.IsDaemon() {
new.Phase = wfv1.NodeSucceeded
} else {
new.Phase, new.Message = woc.inferFailedReason(pod, tmpl)
woc.log.WithField("displayName", old.DisplayName).WithField("templateName", wfutil.GetTemplateFromNode(*old)).
WithField("pod", pod.Name).Infof("Pod failed: %s", new.Message)
}
new.Phase, new.Message = woc.inferFailedReason(pod, tmpl)
woc.log.WithField("displayName", old.DisplayName).WithField("templateName", old.TemplateName).WithField("pod", pod.Name).Infof("Pod failed: %s", new.Message)
new.Daemoned = nil
case apiv1.PodRunning:
// Daemons are a special case we need to understand the rules:
Expand Down

0 comments on commit 0eebc2d

Please sign in to comment.