Skip to content

Commit 706075a

Browse files
dtaniwakisarabala1979
authored andcommitted
Fix DAG output aggregation (argoproj#1648)
1 parent fa32dab commit 706075a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

workflow/controller/dag.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,7 @@ func (woc *wfOperationCtx) resolveDependencyReferences(dagCtx *dagContext, task
446446
ancestorNodes = append(ancestorNodes, node)
447447
}
448448
}
449-
tmpl := dagCtx.wf.GetStoredOrLocalTemplate(ancestorNode)
450-
if tmpl != nil {
451-
return nil, errors.InternalErrorf("Template of ancestor node '%s' not found", ancestorNode.Name)
452-
}
453-
err := woc.processAggregateNodeOutputs(tmpl, &scope, prefix, ancestorNodes)
449+
err := woc.processAggregateNodeOutputs(nil, &scope, prefix, ancestorNodes)
454450
if err != nil {
455451
return nil, errors.InternalWrapError(err)
456452
}

workflow/controller/operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ func (woc *wfOperationCtx) processAggregateNodeOutputs(tmpl *wfv1.Template, scop
16751675
}
16761676
}
16771677
}
1678-
if tmpl.GetType() == wfv1.TemplateTypeScript {
1678+
if tmpl != nil && tmpl.GetType() == wfv1.TemplateTypeScript {
16791679
resultsJSON, err := json.Marshal(resultsList)
16801680
if err != nil {
16811681
return err

0 commit comments

Comments
 (0)