Skip to content

Commit

Permalink
fix: no need to update revision of configSpecs that have not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sophon-zt committed Oct 20, 2023
1 parent 88677d9 commit 3a7c6c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion controllers/apps/configuration/configuration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func (r *ConfigurationReconciler) runTasks(taskCtx TaskContext, tasks []Task) (e
patch := client.MergeFrom(configuration.DeepCopy())
revision := strconv.FormatInt(configuration.GetGeneration(), 10)
for _, task := range tasks {
task.Status.UpdateRevision = revision
if err := task.Do(taskCtx.fetcher, synthesizedComp, revision); err != nil {
errs = append(errs, err)
continue
Expand Down
2 changes: 2 additions & 0 deletions controllers/apps/configuration/reconcile_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ func syncImpl(fetcher *Task,
UpdateConfigVersion(revision).
Sync().
Complete()

status.UpdateRevision = revision
if err != nil {
status.Message = cfgutil.ToPointer(err.Error())
status.Phase = appsv1alpha1.CMergeFailedPhase
Expand Down

0 comments on commit 3a7c6c0

Please sign in to comment.