Skip to content

Commit

Permalink
fix: Daemon step in running state, but dependents don't start (#7107)
Browse files Browse the repository at this point in the history
* fix: Daemon step in running state, but dependents don't start

Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>

* update

Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>

* updated

Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
  • Loading branch information
sarabala1979 authored and alexec committed Nov 17, 2021
1 parent ccc8d83 commit 508027b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,21 @@ func (woc *wfOperationCtx) findTemplate(pod *apiv1.Pod) *wfv1.Template {
if node == nil {
return nil // I don't expect this to happen in production, just in tests
}
return woc.GetNodeTemplate(node)
}

func (woc *wfOperationCtx) GetNodeTemplate(node *wfv1.NodeStatus) *wfv1.Template {
if node.TemplateRef != nil {
tmplCtx, err := woc.createTemplateContext(node.GetTemplateScope())
if err != nil {
woc.markNodeError(node.Name, err)
}
tmpl, err := tmplCtx.GetTemplateFromRef(node.TemplateRef)
if err != nil {
woc.markNodeError(node.Name, err)
}
return tmpl
}
return woc.wf.GetTemplateByName(node.TemplateName)
}

Expand Down

0 comments on commit 508027b

Please sign in to comment.