Repository navigation
fix(controller): QMC terminal-error backstop requeue (AUTH-14 watch flake root cause) - #162
Merged
Merged
Conversation
AUTH-14 watch-driven recovery flaked because a transient hub re-read
failure in secretEnqueueMapper silently dropped the enqueue, and the
fail() terminal path returned ctrl.Result{}, nil — leaving the QMC
permanently stuck until a future watch event arrived.
Add TerminalRetryInterval (2m default) backstop: the QMC reconciler now
schedules a periodic requeue on terminal errors (e.g. 401 Unauthorized)
so the controller self-heals within the retry window even if the Secret
watch enqueue was dropped. The Secret watch remains the fast path.
Update e2e test description and timing-helper comment to reflect the
watch-or-backstop semantics, and pin the new behaviour with a unit
assertion on the terminal error path.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…AUTH-14) F-01: amend ADR-0014 with the QMC auth-recovery carve-out, documenting that QMC ping auth failures (401) are recoverable via Secret rotation and a 2-minute backstop requeue is permitted. Fix wrong ADR-0023 citation in code comment and test → ADR-0014. F-02: add TestSetTerminalRetryInterval covering zero/negative-ignore guard. Wire --terminal-retry-interval CLI flag in cmd/main.go so the default is operator-tunable (matching sibling flags for transient/connection-wait). F-05 (P2): raise V(1).Info to Error in unionSecretRefs for non-ignorable hub read failures so a silently-dropped union-Secret enqueue is visible in operator logs, aiding diagnosis even though the backstop recovers it.
|
2 tasks
konih
added a commit
that referenced
this pull request
Jul 27, 2026
The 5m window is empirically too tight under post-merge CI conditions (2 failures: cd032df, fd0da61). Worst case with the 2m TerminalRetryInterval backstop (PR #162): if the backstop fires just before the secret rotation is visible, the next cycle fires at T+2m again; adding ~1m reconcile overhead under loaded runners gives 5m total. 8m gives headroom without masking a total watch miss.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
fail()returnedctrl.Result{}, nil— no requeue. The controller was permanently stuck until the Secret-watch fired. Under loaded kind/CI, a transient hub re-read failure insecretEnqueueMappersilently dropped the enqueue, stranding the QMC forever. This is why the spec timed out at both 3m and 5m with zero reconcile events in that window.TerminalRetryInterval(2m default, overridable viaSetTerminalRetryInterval) as a backstop requeue in thefail()terminal path. The Secret watch remains the fast path; the backstop fires if the watch enqueue was dropped.RequeueAfter = TerminalRetryInterval().Test plan
task verifygreen ✅task test:rungreen (internal/ 92.5%, api/ 76.3%) ✅task lintgreen ✅task format:checkgreen ✅e2e (kustomize)— watch-driven spec should now pass within 5m (worst-case recovery ≈ 2m backstop + ~30s overhead)