diff --git a/applicationset/controllers/applicationset_controller.go b/applicationset/controllers/applicationset_controller.go index f53bfb38fdc4d..dc5882933cbb7 100644 --- a/applicationset/controllers/applicationset_controller.go +++ b/applicationset/controllers/applicationset_controller.go @@ -1268,9 +1268,16 @@ func (r *ApplicationSetReconciler) migrateStatus(ctx context.Context, appset *ar } if update { + namespacedName := types.NamespacedName{Namespace: appset.Namespace, Name: appset.Name} if err := r.Client.Status().Update(ctx, appset); err != nil { return fmt.Errorf("unable to set application set status: %w", err) } + if err := r.Get(ctx, namespacedName, appset); err != nil { + if client.IgnoreNotFound(err) != nil { + return nil + } + return fmt.Errorf("error fetching updated application set: %w", err) + } } return nil }