Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3156 from osela/reset-sync-errors
Browse files Browse the repository at this point in the history
reset sync errors on successful sync
  • Loading branch information
Kingdon Barrett committed Aug 19, 2021
2 parents 806e5ab + f30fbd7 commit 371e94c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/cluster/kubernetes/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ func (c *Cluster) Sync(syncSet cluster.SyncSet) error {
errs = append(errs, deleteErrs...)
}

// It is expected that Cluster.Sync is invoked with *all* resources.
// Otherwise it will override previously recorded sync errors.
c.setSyncErrors(errs)

// If `nil`, errs is a cluster.SyncError(nil) rather than error(nil), so it cannot be returned directly.
if errs == nil {
return nil
}

// It is expected that Cluster.Sync is invoked with *all* resources.
// Otherwise it will override previously recorded sync errors.
c.setSyncErrors(errs)
return errs
}

Expand Down

0 comments on commit 371e94c

Please sign in to comment.