Skip to content

Commit

Permalink
speed improvements
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Oct 27, 2022
1 parent f2faf14 commit b3e0543
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion operator/controllers/common/phasehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (r PhaseHandler) HandlePhase(ctx context.Context, ctxAppTrace context.Conte
requeueResult := ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}
piWrapper, err := NewPhaseItemWrapperFromClientObject(reconcileObject)
if err != nil {
return &PhaseResult{Continue: false, Result: requeueResult}, err
return &PhaseResult{Continue: false, Result: ctrl.Result{Requeue: true}}, err
}
oldStatus := piWrapper.GetState()
oldPhase := piWrapper.GetCurrentPhase()
Expand Down
2 changes: 1 addition & 1 deletion operator/controllers/keptnappversion/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *KeptnAppVersionReconciler) Reconcile(ctx context.Context, req ctrl.Requ
appVersion := &klcv1alpha1.KeptnAppVersion{}
err := r.Get(ctx, req.NamespacedName, appVersion)
if errors.IsNotFound(err) {
return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, nil
return reconcile.Result{}, nil
}

if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions operator/controllers/keptnevaluation/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (r *KeptnEvaluationReconciler) Reconcile(ctx context.Context, req ctrl.Requ
return ctrl.Result{}, nil
}
r.Log.Error(err, "Failed to get the KeptnEvaluation")
return ctrl.Result{Requeue: true, RequeueAfter: 30 * time.Second}, nil
return ctrl.Result{}, nil
}

traceContextCarrier := propagation.MapCarrier(evaluation.Annotations)
Expand Down Expand Up @@ -114,7 +114,7 @@ func (r *KeptnEvaluationReconciler) Reconcile(ctx context.Context, req ctrl.Requ
if err != nil {
if errors.IsNotFound(err) {
r.Log.Info(err.Error() + ", ignoring error since object must be deleted")
return ctrl.Result{Requeue: true, RequeueAfter: 30 * time.Second}, nil
return ctrl.Result{Requeue: true, RequeueAfter: 10 * time.Second}, nil
}
r.Log.Error(err, "Failed to retrieve a resource")
return ctrl.Result{}, nil
Expand Down
2 changes: 1 addition & 1 deletion operator/controllers/keptnworkloadinstance/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr
workloadInstance := &klcv1alpha1.KeptnWorkloadInstance{}
err := r.Get(ctx, req.NamespacedName, workloadInstance)
if errors.IsNotFound(err) {
return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, nil
return reconcile.Result{}, nil
}

if err != nil {
Expand Down

0 comments on commit b3e0543

Please sign in to comment.