fix: return error immediately on failed reconciliation status#5692
fix: return error immediately on failed reconciliation status#5692Aman-Cool wants to merge 1 commit into
Conversation
|
@matheuscscp @stefanprodan ,This makes |
|
Please squash |
Co-authored-by: Matheus Pimenta <matheuscscp@gmail.com> Signed-off-by: Aman-Cool <aman017102007@gmail.com>
bd3f10b to
0a29617
Compare
|
@matheuscscp , Squashed into a single commit. All checks are green. |
|
@stefanprodan ,Please see it when you have time, happy to help if it needs any updates. Thanks! |
themavik
left a comment
There was a problem hiding this comment.
reconciliationHandled now returns fmt.Errorf(result.Message) for non-Current kstatus instead of (false, nil), so failed reconciles bubble up. nit: InProgress still returns false, nil—still the right shape for the wait loop?
|
With the health check cancellation we've shipped in 2.8 this change would make things worse. We should be waiting and not bailout if |
Flux reconcile does not fail fast on Failed status
flux reconciledoes not fail fast when a resource is already inFailedstatus.The polling condition treats
FailedStatusthe same asInProgressStatus, so the command waits until the full timeout (default 5 minutes) before reporting an error.This causes unnecessary delays and poor UX. The fix is to return an error for terminal failure states, matching the behavior of
isObjectReady().