Skip to content

Commit

Permalink
Update status for all reconcile errors (#3960)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed May 12, 2023
1 parent c544dff commit 2cbaaff
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -108,7 +108,8 @@ func (r *PackageVariantSetReconciler) Reconcile(ctx context.Context, req ctrl.Re
setStalledConditionsToTrue(pvs, "NoMatchingTargets", err.Error())
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
setStalledConditionsToTrue(pvs, "UnexpectedError", err.Error())
return ctrl.Result{}, nil
}

meta.SetStatusCondition(&pvs.Status.Conditions, metav1.Condition{
Expand All @@ -120,7 +121,8 @@ func (r *PackageVariantSetReconciler) Reconcile(ctx context.Context, req ctrl.Re

err = r.ensurePackageVariants(ctx, pvs, repoList, upstreamPR, downstreams)
if err != nil {
return ctrl.Result{}, err
setStalledConditionsToTrue(pvs, "UnexpectedError", err.Error())
return ctrl.Result{}, nil
}

meta.SetStatusCondition(&pvs.Status.Conditions, metav1.Condition{
Expand Down

0 comments on commit 2cbaaff

Please sign in to comment.