From 15a769aeedb207696a3240544f0a4f357e91f8a0 Mon Sep 17 00:00:00 2001 From: Jack Lin Date: Thu, 4 Jul 2024 15:40:08 +0800 Subject: [PATCH] fix(recurring): fix update recurring job parameters does not work issue ref: longhorn/longhorn 8291 Signed-off-by: Jack Lin --- manager/recurringjob.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/manager/recurringjob.go b/manager/recurringjob.go index e54b4ebd95..198c8ef864 100644 --- a/manager/recurringjob.go +++ b/manager/recurringjob.go @@ -65,11 +65,7 @@ func (m *VolumeManager) UpdateRecurringJob(spec longhorn.RecurringJobSpec) (*lon } sort.Strings(recurringJob.Spec.Groups) sort.Strings(spec.Groups) - if recurringJob.Spec.Cron == spec.Cron && - reflect.DeepEqual(recurringJob.Spec.Groups, spec.Groups) && - recurringJob.Spec.Retain == spec.Retain && - recurringJob.Spec.Concurrency == spec.Concurrency && - reflect.DeepEqual(recurringJob.Spec.Labels, spec.Labels) { + if reflect.DeepEqual(recurringJob.Spec, spec) { return recurringJob, nil } recurringJob.Spec.Cron = spec.Cron @@ -77,6 +73,7 @@ func (m *VolumeManager) UpdateRecurringJob(spec longhorn.RecurringJobSpec) (*lon recurringJob.Spec.Retain = spec.Retain recurringJob.Spec.Concurrency = spec.Concurrency recurringJob.Spec.Labels = spec.Labels + recurringJob.Spec.Parameters = spec.Parameters return m.ds.UpdateRecurringJob(recurringJob) }