Skip to content

Commit

Permalink
fix: default initialisation markNodePhase
Browse files Browse the repository at this point in the history
Signed-off-by: Isitha Subasinghe <isitha@pipekit.io>
  • Loading branch information
isubasinghe committed Oct 30, 2022
1 parent 23e3d4d commit 7644f14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workflow/controller/operator.go
Expand Up @@ -2309,7 +2309,8 @@ func (woc *wfOperationCtx) initializeNode(nodeName string, nodeType wfv1.NodeTyp
func (woc *wfOperationCtx) markNodePhase(nodeName string, phase wfv1.NodePhase, message ...string) *wfv1.NodeStatus {
node := woc.wf.GetNodeByName(nodeName)
if node == nil {
panic(fmt.Sprintf("workflow '%s' node '%s' uninitialized when marking as %v: %s", woc.wf.Name, nodeName, phase, message))
woc.log.Warningf("workflow '%s' node '%s' uninitialized when marking as %v: %s", woc.wf.Name, nodeName, phase, message)
node = &wfv1.NodeStatus{}
}
if node.Phase != phase {
if node.Phase.Fulfilled() {
Expand Down

0 comments on commit 7644f14

Please sign in to comment.