Skip to content

Commit

Permalink
Merge branch 'pv-fast-error' into nokia
Browse files Browse the repository at this point in the history
  • Loading branch information
kispaljr committed Jun 21, 2024
2 parents d9fc5e6 + 0c16cd3 commit 32ccdcc
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"fmt"
"strconv"
"strings"
"time"

porchapi "github.com/nephio-project/porch/api/porch/v1alpha1"
configapi "github.com/nephio-project/porch/api/porchconfig/v1alpha1"
Expand Down Expand Up @@ -59,8 +58,6 @@ const (

ConditionTypeStalled = "Stalled" // whether or not the packagevariant object is making progress or not
ConditionTypeReady = "Ready" // whether or not the reconciliation succeeded

requeueDuration = 30 * time.Second
)

//go:generate go run sigs.k8s.io/controller-tools/cmd/[email protected] rbac:headerFile=../../../../../scripts/boilerplate.yaml.txt,roleName=porch-controllers-packagevariants webhook paths="." output:rbac:artifacts:config=../../../config/rbac
Expand Down Expand Up @@ -129,7 +126,7 @@ func (r *PackageVariantReconciler) Reconcile(ctx context.Context, req ctrl.Reque
if err != nil {
setStalledConditionsToTrue(pv, err.Error())
// requeue, as the upstream may appear
return ctrl.Result{RequeueAfter: requeueDuration}, err
return ctrl.Result{}, err
}
meta.SetStatusCondition(&pv.Status.Conditions, metav1.Condition{
Type: ConditionTypeStalled,
Expand All @@ -147,7 +144,7 @@ func (r *PackageVariantReconciler) Reconcile(ctx context.Context, req ctrl.Reque
Message: err.Error(),
})
// requeue; it may be an intermittent error
return ctrl.Result{RequeueAfter: requeueDuration}, nil
return ctrl.Result{}, err
}

setTargetStatusConditions(pv, targets)
Expand Down

0 comments on commit 32ccdcc

Please sign in to comment.