Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, pr *v1.PipelineRun) pkgr
if timeout != config.NoTimeoutDuration {
waitTime := timeout - elapsed
if finallyWaitTime < waitTime {
waitTime = finallyWaitTime
return controller.NewRequeueAfter(finallyWaitTime)
}
return controller.NewRequeueAfter(waitTime)
}
Expand Down
3 changes: 3 additions & 0 deletions test/excessive_reconciliation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ func getTektonNamespace() string {
// With the fix, reconciliations should stay well below 20 (typically around 10 or less).
//
// This test validates the fix by counting actual reconciliations from controller logs.
//
// @test:execution=parallel
func TestPipelineRunExcessiveReconciliation(t *testing.T) {
ctx := t.Context()
ctx, cancel := context.WithCancel(ctx)
defer cancel()

c, namespace := setup(ctx, t)
t.Parallel()

knativetest.CleanupOnInterrupt(func() { tearDown(ctx, t, c, namespace) }, t.Logf)
defer tearDown(ctx, t, c, namespace)
Expand Down
Loading