From f8a264ef450afcd19684f7d7a882ff2482cff139 Mon Sep 17 00:00:00 2001 From: shuangkun Date: Mon, 18 Mar 2024 17:00:33 +0800 Subject: [PATCH] fix: lint Signed-off-by: shuangkun --- test/e2e/hooks_test.go | 2 +- workflow/controller/operator.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 8d18c729a3ed..7172c62d0e1c 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -740,7 +740,7 @@ spec: Then(). ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) { assert.True(t, status.Fulfilled()) - for _, node :=range status.Nodes { + for _, node := range status.Nodes { if node.Type == v1alpha1.NodeTypeRetry { if node.Phase == v1alpha1.NodeSucceeded { assert.Equal(t, v1alpha1.WorkflowSucceeded, status.Phase) diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index 3915f091e220..bf9c2223426d 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -1761,7 +1761,7 @@ func (woc *wfOperationCtx) deletePVCs(ctx context.Context) error { // Check if we have a retry node which wasn't memoized and return that if we do func (woc *wfOperationCtx) possiblyGetRetryChildNode(node *wfv1.NodeStatus) *wfv1.NodeStatus { if node.Type == wfv1.NodeTypeRetry && !(node.MemoizationStatus != nil && node.MemoizationStatus.Hit) { - for i := len(node.Children)-1 ; i >= 0; i-- { + for i := len(node.Children) - 1; i >= 0; i-- { childNode := getChildNodeIndex(node, woc.wf.Status.Nodes, i) if childNode == nil { continue