From 7445461c68b1ed7ca9eb7ed91530e5cd48784c0b Mon Sep 17 00:00:00 2001 From: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:39:00 -0700 Subject: [PATCH] fix(tektonconfig): stop logging requeue as error Motivation: On a fresh install, TektonConfig's PostReconcile step polls dependent CRs (TektonDashboard, TektonAddon, OpenShiftPipelinesAsCode) that are not ready yet. The extension's PostReconcile hook signals this expected, transient condition by returning the v1alpha1.REQUEUE_EVENT_AFTER sentinel, per this repo's own convention that it means "retry later", not a failure. ReconcileKind logged every such return at ERROR level with a full stack trace ("Post-reconcile hook failed", error "requeue after: 10s"), repeating every ~10s until the dependency became ready, flooding the operator's logs during a routine install. Approach: Check for the v1alpha1.REQUEUE_EVENT_AFTER sentinel before logging, matching the pattern already used elsewhere in this file (e.g. the PreReconcile hook a few lines above) and throughout the reconciler package (e.g. tektonpipeline, tektontrigger, manualapprovalgate). When PostReconcile returns this sentinel, log at Info level instead of Error. The returned error value is unchanged in both branches, so the knative controller's requeue/retry behavior is identical before and after this change; only the log severity for this benign, expected condition changes. Validation: go build ./... and go vet ./pkg/reconciler/shared/tektonconfig/... pass with no issues; gofmt -l on the changed file reports no formatting issues; go test ./pkg/reconciler/shared/tektonconfig/... passes for all subpackages (the top-level package has no pre-existing unit test file for ReconcileKind to extend, and this is a log-severity-only change with no behavioral difference to assert against). golangci-lint could not be run in this sandbox: `make lint-go` fails downloading the golangci-lint binary from GitHub with a checksum verification error, a sandbox/network restriction unrelated to this change. Report: https://github.com/tektoncd/operator/issues/3125 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> --- pkg/reconciler/shared/tektonconfig/tektonconfig.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/reconciler/shared/tektonconfig/tektonconfig.go b/pkg/reconciler/shared/tektonconfig/tektonconfig.go index d246d3fe5d..7f79b680bb 100644 --- a/pkg/reconciler/shared/tektonconfig/tektonconfig.go +++ b/pkg/reconciler/shared/tektonconfig/tektonconfig.go @@ -408,6 +408,10 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, tc *v1alpha1.TektonConfi // Post-reconcile extension hooks if err := r.extension.PostReconcile(ctx, tc); err != nil { + if err == v1alpha1.REQUEUE_EVENT_AFTER { + logger.Infow("Post-reconcile hook requested requeue", "error", err) + return err + } logger.Errorw("Post-reconcile hook failed", "error", err) return err }