From 12fec5b68f47bb6069a34953b27e6f5411eea800 Mon Sep 17 00:00:00 2001 From: isubasinghe Date: Thu, 2 Jan 2025 16:13:05 +1100 Subject: [PATCH] fix: added missing contexts Signed-off-by: isubasinghe --- workflow/controller/operator_test.go | 6 +++--- workflow/controller/steps.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/controller/operator_test.go b/workflow/controller/operator_test.go index 5a4cdebae53e..e452e331cb7d 100644 --- a/workflow/controller/operator_test.go +++ b/workflow/controller/operator_test.go @@ -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 { @@ -11310,7 +11310,7 @@ 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) @@ -11318,7 +11318,7 @@ func TestContainerSetWithDependenciesWhenPodDeleted(t *testing.T) { // 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 { diff --git a/workflow/controller/steps.go b/workflow/controller/steps.go index 23083d7ffd2f..c03ad841bbdb 100644 --- a/workflow/controller/steps.go +++ b/workflow/controller/steps.go @@ -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)