// updateStatusWithRetry updates the progressive sync object status with backoff
updateStatusWithRetry updates the progressive sync object status with backoff
// updateStatusWithRetry updates the progressive sync object status with backoff
func (r *ProgressiveSyncReconciler) updateStatusWithRetry(ctx context.Context, pr *syncv1alpha1.ProgressiveSync) error {
	retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error {
		key := client.ObjectKeyFromObject(pr)
		latest := syncv1alpha1.ProgressiveSync{}
		if err := r.Client.Get(ctx, key, &latest); err != nil {
			return err
		}
		latest.Status = pr.Status
		if err := r.Client.Status().Update(ctx, &latest); err != nil {
			return err
		}
		return nil
	})
	return retryErr
}
func ( r * ProgressiveSyncReconciler ) updateStatusWithRetry ( ctx context . Context , pr * syncv1alpha1 . ProgressiveSync ) error { retryErr := retry . RetryOnConflict ( retry . DefaultRetry , func ( ) error { key := client . ObjectKeyFromObject ( pr ) latest := syncv1alpha1 . ProgressiveSync { } if err := r . Client . Get ( ctx , key , & latest ) ; err != nil { return err } latest . Status = pr . Status if err := r . Client . Status ( ) . Update ( ctx , & latest ) ; err != nil { return err } return nil } ) return retryErr }
updateStatusWithRetry updates the progressive sync object status with backoff
updateStatusWithRetry updates the progressive sync object status with backoff