Skip to content

fix(tektonconfig): stop logging requeue as error - #3881

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
pujitha24:auto/issue-3125
Aug 10, 2026
Merged

fix(tektonconfig): stop logging requeue as error#3881
tekton-robot merged 1 commit into
tektoncd:mainfrom
pujitha24:auto/issue-3125

Conversation

@pujitha24

Copy link
Copy Markdown
Contributor

Changes

Fixed TektonConfig's PostReconcile step logging every expected "not ready yet" retry at ERROR level with a full stack trace. On a fresh install, the extension's PostReconcile hook polls dependent CRs (TektonDashboard, TektonAddon, OpenShiftPipelinesAsCode) that aren't ready yet, and signals this transient condition by returning the v1alpha1.REQUEUE_EVENT_AFTER sentinel — per this repo's convention that it means "retry later", not a failure. ReconcileKind was logging every such return as an error ("Post-reconcile hook failed"), repeating every ~10s until the dependency became ready and flooding the operator's logs during a routine install.

This change checks for the v1alpha1.REQUEUE_EVENT_AFTER sentinel before logging, matching the pattern already used elsewhere in this file (e.g. the PreReconcile hook) and throughout the reconciler package (e.g. tektonpipeline, tektontrigger, manualapprovalgate). When PostReconcile returns this sentinel, the log level is now Info instead of Error. The returned error value is unchanged in both branches, so requeue/retry behavior is identical before and after this change; only the log severity for this benign, expected condition changes.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

AI assistance: this change was drafted with Claude Code.

Fixes #3125

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: tektoncd#3125
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Aug 9, 2026
@tekton-robot
tekton-robot requested review from infernus01 and khrm August 9, 2026 11:41
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.13%. Comparing base (e18041d) to head (7445461).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3881      +/-   ##
==========================================
- Coverage   26.13%   26.13%   -0.01%     
==========================================
  Files         465      465              
  Lines       24930    24933       +3     
==========================================
  Hits         6516     6516              
- Misses      17694    17697       +3     
  Partials      720      720              
Flag Coverage Δ
unit-tests 26.13% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jkhelil

jkhelil commented Aug 10, 2026

Copy link
Copy Markdown
Member

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkhelil

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2026
@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2026
@tekton-robot
tekton-robot merged commit aadfe5a into tektoncd:main Aug 10, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconcilliation Issues Causes Log Flooding

4 participants