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

Commit

Permalink
reset sync errors on successful sync
Browse files Browse the repository at this point in the history
  • Loading branch information
osela authored and Kingdon Barrett committed Apr 27, 2021
1 parent a13a470 commit 5ad6c34
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 @@ -115,14 +115,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 5ad6c34

Please sign in to comment.