Skip to content

fix: propagate SSA dry-run errors instead of falling back to SimpleDriftCheck#149

Merged
tiraboschi merged 1 commit intoopenshift-virtualization:mainfrom
tiraboschi:tls_backoff
Apr 17, 2026
Merged

fix: propagate SSA dry-run errors instead of falling back to SimpleDriftCheck#149
tiraboschi merged 1 commit intoopenshift-virtualization:mainfrom
tiraboschi:tls_backoff

Conversation

@tiraboschi
Copy link
Copy Markdown
Collaborator

When DetectDrift failed (e.g. due to a webhook TLS certificate issue during OLM cert rotation), the Patcher was falling back to SimpleDriftCheck, which compares the minimal rendered template against the fully webhook-defaulted live object and almost always reports drift. This caused a false-positive cascade into the thrashing detector, producing confusing "edit war" log messages and repeated reconciliation errors until the operator restarted.

The fix propagates the DetectDrift error so controller-runtime backs off and retries with proper exponential backoff until the transient condition (e.g. cert rotation window) resolves naturally.

Also introduces the driftChecker interface to allow injection of a mock in tests, and adds TestDetectDriftPropagatesClientError to pin this behavior.

…iftCheck

When DetectDrift failed (e.g. due to a webhook TLS certificate issue during
OLM cert rotation), the Patcher was falling back to SimpleDriftCheck, which
compares the minimal rendered template against the fully webhook-defaulted
live object and almost always reports drift. This caused a false-positive
cascade into the thrashing detector, producing confusing "edit war" log
messages and repeated reconciliation errors until the operator restarted.

The fix propagates the DetectDrift error so controller-runtime backs off
and retries with proper exponential backoff until the transient condition
(e.g. cert rotation window) resolves naturally.

Also introduces the driftChecker interface to allow injection of a mock in
tests, and adds TestDetectDriftPropagatesClientError to pin this behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@tiraboschi tiraboschi merged commit 8c26056 into openshift-virtualization:main Apr 17, 2026
5 checks passed
@tiraboschi tiraboschi deleted the tls_backoff branch April 17, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant