Skip to content

Commit

Permalink
fix(controller): handle nil processedTmpl in DAGs (argoproj#13548)
Browse files Browse the repository at this point in the history
Signed-off-by: joey <zchengjoey@gmail.com>
  • Loading branch information
chengjoey authored and Joibel committed Sep 19, 2024
1 parent b3ec695 commit d1f569b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions workflow/controller/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,11 @@ func (woc *wfOperationCtx) executeDAGTask(ctx context.Context, dagCtx *dagContex

if node != nil && node.Fulfilled() {
// Collect the completed task metrics
_, tmpl, _, _ := dagCtx.tmplCtx.ResolveTemplate(task)
_, tmpl, _, tmplErr := dagCtx.tmplCtx.ResolveTemplate(task)
if tmplErr != nil {
woc.markNodeError(node.Name, tmplErr)
return
}
if err := woc.mergedTemplateDefaultsInto(tmpl); err != nil {
woc.markNodeError(node.Name, err)
return
Expand All @@ -449,7 +453,7 @@ func (woc *wfOperationCtx) executeDAGTask(ctx context.Context, dagCtx *dagContex
}

// Release acquired lock completed task.
if tmpl != nil {
if processedTmpl != nil {
woc.controller.syncManager.Release(woc.wf, node.ID, processedTmpl.Synchronization)
}

Expand Down

0 comments on commit d1f569b

Please sign in to comment.