From 0a29617f4652161e3dae4d2e315da05fd1996bf4 Mon Sep 17 00:00:00 2001 From: Aman-Cool Date: Mon, 26 Jan 2026 22:37:56 +0530 Subject: [PATCH 1/2] fix: return error immediately on failed reconciliation status Co-authored-by: Matheus Pimenta Signed-off-by: Aman-Cool --- cmd/flux/reconcile.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/flux/reconcile.go b/cmd/flux/reconcile.go index ffdcce91..9f0787bd 100644 --- a/cmd/flux/reconcile.go +++ b/cmd/flux/reconcile.go @@ -152,7 +152,14 @@ func reconciliationHandled(kubeClient client.Client, namespacedName types.Namesp return false, err } - return result.Status == kstatus.CurrentStatus, nil + switch result.Status { + case kstatus.CurrentStatus: + return true, nil + case kstatus.InProgressStatus: + return false, nil + default: + return false, fmt.Errorf("%s", result.Message) + } } } From 90b95b29fc7b4beb694728832a41a9765fcf3be5 Mon Sep 17 00:00:00 2001 From: Aman-Cool Date: Sun, 1 Feb 2026 14:50:41 +0530 Subject: [PATCH 2/2] fix: return error when resume reconciliation fails Signed-off-by: Aman-Cool --- cmd/flux/resume.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/flux/resume.go b/cmd/flux/resume.go index fe23a411..e531ecee 100644 --- a/cmd/flux/resume.go +++ b/cmd/flux/resume.go @@ -126,6 +126,17 @@ func (resume resumeCommand) run(cmd *cobra.Command, args []string) error { resume.printMessage(reconcileResps) + // Return an error if any reconciliation failed + var failedCount int + for _, r := range reconcileResps { + if r.resumable != nil && r.err != nil { + failedCount++ + } + } + if failedCount > 0 { + return fmt.Errorf("reconciliation failed for %d %s(s)", failedCount, resume.kind) + } + return nil }