Skip to content

Commit

Permalink
fix: added missing contexts
Browse files Browse the repository at this point in the history
Signed-off-by: isubasinghe <[email protected]>
  • Loading branch information
isubasinghe committed Jan 2, 2025
1 parent 9cb307f commit 12fec5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions workflow/controller/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11249,7 +11249,7 @@ func TestContainerSetWhenPodDeleted(t *testing.T) {
assert.Empty(t, pods.Items)

// reconcile
woc = newWorkflowOperationCtx(woc.wf, controller)
woc = newWorkflowOperationCtx(ctx, woc.wf, controller)
woc.operate(ctx)
assert.Equal(t, wfv1.WorkflowError, woc.wf.Status.Phase)
for _, node := range woc.wf.Status.Nodes {
Expand Down Expand Up @@ -11310,15 +11310,15 @@ func TestContainerSetWithDependenciesWhenPodDeleted(t *testing.T) {
require.NoError(t, err)
wf, err = wfcset.Get(ctx, wf.ObjectMeta.Name, metav1.GetOptions{})
require.NoError(t, err)
woc := newWorkflowOperationCtx(wf, controller)
woc := newWorkflowOperationCtx(ctx, wf, controller)
woc.operate(ctx)
pods, err := listPods(woc)
require.NoError(t, err)
assert.Len(t, pods.Items, 1)

// mark pod Running
makePodsPhase(ctx, woc, apiv1.PodRunning)
woc = newWorkflowOperationCtx(woc.wf, controller)
woc = newWorkflowOperationCtx(ctx, woc.wf, controller)
woc.operate(ctx)
for _, node := range woc.wf.Status.Nodes {
if node.Type == wfv1.NodeTypePod {
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (woc *wfOperationCtx) executeSteps(ctx context.Context, nodeName string, tm

sgNode, err := woc.executeStepGroup(ctx, stepGroup.Steps, sgNodeName, &stepsCtx)
if err != nil {
return woc.markNodeError(sgNodeName, err), nil
return woc.markNodeError(ctx, sgNodeName, err), nil
}
if !sgNode.Fulfilled() {
woc.log.Infof(ctx, "Workflow step group node %s not yet completed", sgNode.ID)
Expand Down

0 comments on commit 12fec5b

Please sign in to comment.