From 950b1207190ede47ce2c9f19c214c7d405bea315 Mon Sep 17 00:00:00 2001 From: duanmengkk Date: Wed, 15 May 2024 10:31:09 +0800 Subject: [PATCH] Merge pull request #558 from duanmengkk/fix_skip fix the skip bug --- .../virtualcluster.node.controller/workflow/workflow.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubenest/controller/virtualcluster.node.controller/workflow/workflow.go b/pkg/kubenest/controller/virtualcluster.node.controller/workflow/workflow.go index 24b209d27..3c550ee0d 100644 --- a/pkg/kubenest/controller/virtualcluster.node.controller/workflow/workflow.go +++ b/pkg/kubenest/controller/virtualcluster.node.controller/workflow/workflow.go @@ -47,14 +47,14 @@ func (w WorkflowData) RunTask(ctx context.Context, opt task.TaskOpt) error { var args interface{} for i, t := range w.Tasks { klog.V(4).Infof("HHHHHHHHHHHH (%d/%d) work flow run t %s HHHHHHHHHHHH", i+1, len(w.Tasks), t.Name) - if t.Skip(ctx, opt) { + if t.Skip != nil && t.Skip(ctx, opt) { klog.V(4).Infof("work flow skip task %s", t.Name) continue } if len(t.SubTasks) > 0 { for j, subTask := range t.SubTasks { klog.V(4).Infof("HHHHHHHHHHHH (%d/%d) work flow run sub t %s HHHHHHHHHHHH", j+1, len(t.SubTasks), subTask.Name) - if t.Skip(ctx, opt) { + if t.Skip != nil && t.Skip(ctx, opt) { klog.V(4).Infof("work flow skip sub task %s", t.Name) continue }