Skip to content

Commit

Permalink
Fix dag output aggregation correctly (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaniwaki authored and sarabala1979 committed Oct 7, 2019
1 parent 706075a commit cd6f362
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion workflow/controller/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,11 @@ func (woc *wfOperationCtx) resolveDependencyReferences(dagCtx *dagContext, task
ancestorNodes = append(ancestorNodes, node)
}
}
err := woc.processAggregateNodeOutputs(nil, &scope, prefix, ancestorNodes)
tmpl := dagCtx.wf.GetStoredOrLocalTemplate(ancestorNode)
if tmpl == nil {
return nil, errors.InternalErrorf("Template of ancestor node '%s' not found", ancestorNode.Name)
}
err := woc.processAggregateNodeOutputs(tmpl, &scope, prefix, ancestorNodes)
if err != nil {
return nil, errors.InternalWrapError(err)
}
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ func (woc *wfOperationCtx) processAggregateNodeOutputs(tmpl *wfv1.Template, scop
}
}
}
if tmpl != nil && tmpl.GetType() == wfv1.TemplateTypeScript {
if tmpl.GetType() == wfv1.TemplateTypeScript {
resultsJSON, err := json.Marshal(resultsList)
if err != nil {
return err
Expand Down

0 comments on commit cd6f362

Please sign in to comment.