mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-03 15:29:45 +02:00
Bump go and go dependencies and modify deprecated Requeue to RequeueAfter (#4678)
This commit is contained in:
@@ -291,7 +291,7 @@ func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
|
||||
|
||||
case errors.Is(err, retryableError):
|
||||
log.Info("Encountered retryable error, requeueing", "error", err.Error())
|
||||
return ctrl.Result{Requeue: true}, nil
|
||||
return ctrl.Result{RequeueAfter: 500 * time.Millisecond}, nil
|
||||
case errors.Is(err, fatalError):
|
||||
log.Info("JIT config cannot be created for this ephemeral runner, issuing delete", "error", err.Error())
|
||||
if err := r.Delete(ctx, &ephemeralRunner); err != nil {
|
||||
@@ -315,7 +315,7 @@ func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
|
||||
return ctrl.Result{}, fmt.Errorf("failed to delete the corrupted runner config secret")
|
||||
}
|
||||
log.Info("Corrupted runner config secret has been deleted")
|
||||
return ctrl.Result{Requeue: true}, nil
|
||||
return ctrl.Result{RequeueAfter: 500 * time.Millisecond}, nil
|
||||
}
|
||||
|
||||
runnerName := string(secret.Data["runnerName"])
|
||||
@@ -351,8 +351,10 @@ func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
|
||||
"nextReconciliation", nextReconciliation,
|
||||
"requeueAfter", requeueAfter,
|
||||
)
|
||||
if requeueAfter <= 0 {
|
||||
requeueAfter = time.Millisecond
|
||||
}
|
||||
return ctrl.Result{
|
||||
Requeue: true,
|
||||
RequeueAfter: requeueAfter,
|
||||
}, nil
|
||||
}
|
||||
@@ -371,7 +373,7 @@ func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
|
||||
return result, nil
|
||||
case kerrors.IsAlreadyExists(err):
|
||||
log.Info("Runner pod already exists. Waiting for the pod event to be received")
|
||||
return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil
|
||||
return ctrl.Result{RequeueAfter: 5 * time.Second}, nil
|
||||
case kerrors.IsInvalid(err):
|
||||
log.Error(err, "Failed to create a pod due to unrecoverable failure")
|
||||
errMessage := fmt.Sprintf("Failed to create the pod: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user