diff --git a/backend/src/apiserver/resource/resource_manager.go b/backend/src/apiserver/resource/resource_manager.go index 231c85dc2b5..26167fbcb1e 100644 --- a/backend/src/apiserver/resource/resource_manager.go +++ b/backend/src/apiserver/resource/resource_manager.go @@ -604,9 +604,8 @@ func (r *ResourceManager) ReconcileSwfCrs(ctx context.Context) error { } if !reflect.DeepEqual(currentScheduledWorkflow.Spec, newScheduledWorkflow.Spec) { - newScheduledWorkflow.Name = currentScheduledWorkflow.Name - newScheduledWorkflow.ResourceVersion = currentScheduledWorkflow.ResourceVersion - err = r.updateSwfCrSpec(ctx, jobs[i].Namespace, newScheduledWorkflow) + currentScheduledWorkflow.Spec = newScheduledWorkflow.Spec + err = r.updateSwfCrSpec(ctx, jobs[i].Namespace, currentScheduledWorkflow) if err != nil { if apierrors.IsConflict(errors.Unwrap(err)) { continue