Skip to content

Commit

Permalink
Add constant backoff for TaskRun retry
Browse files Browse the repository at this point in the history
Set constant retry backoff when TaskRun Pods not started due to compute resources unavailaibility
Issue #4847
  • Loading branch information
yannickhilber authored and tekton-robot committed May 18, 2022
1 parent 2e09b38 commit a146455
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/reconciler/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"reflect"
"strings"
"time"

"github.com/hashicorp/go-multierror"
"github.com/tektoncd/pipeline/pkg/apis/config"
Expand Down Expand Up @@ -539,6 +540,7 @@ func (c *Reconciler) handlePodCreationError(ctx context.Context, tr *v1beta1.Tas
// If we are struggling to create the pod, then it hasn't started.
tr.Status.StartTime = nil
tr.Status.MarkResourceOngoing(podconvert.ReasonExceededResourceQuota, fmt.Sprint("TaskRun Pod exceeded available resources: ", err))
return controller.NewRequeueAfter(time.Minute)
case isTaskRunValidationFailed(err):
tr.Status.MarkResourceFailed(podconvert.ReasonFailedValidation, err)
default:
Expand Down

0 comments on commit a146455

Please sign in to comment.