Skip to content

Commit

Permalink
feat: Emit WorkflowNodeRunning event
Browse files Browse the repository at this point in the history
 - Reassign woc.wf.TypeMeta during persistUpdates, since the Workflow
   representation returned from the server does not add this field.

Signed-off-by: Kenny Trytek <kenneth.g.trytek@gmail.com>
  • Loading branch information
kennytrytek committed Apr 18, 2021
1 parent 01bd5ba commit 26ba3cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ func (woc *wfOperationCtx) persistUpdates(ctx context.Context) {
woc.controller.hydrator.HydrateWithNodes(woc.wf, nodes)
}

// The workflow returned from wfClient.Update doesn't have a TypeMeta associated
// with it, so copy from the original workflow.
woc.wf.TypeMeta = woc.orig.TypeMeta

// Create WorkflowNode* events for nodes that have changed phase
woc.recordNodePhaseChangeEvents(&woc.orig.Status.Nodes, &woc.wf.Status.Nodes)

Expand Down

0 comments on commit 26ba3cd

Please sign in to comment.