Skip to content

Commit 0a29617

Browse files
fix: return error immediately on failed reconciliation status
Co-authored-by: Matheus Pimenta <matheuscscp@gmail.com> Signed-off-by: Aman-Cool <aman017102007@gmail.com>
1 parent a4903a9 commit 0a29617

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

cmd/flux/reconcile.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,14 @@ func reconciliationHandled(kubeClient client.Client, namespacedName types.Namesp
152152
return false, err
153153
}
154154

155-
return result.Status == kstatus.CurrentStatus, nil
155+
switch result.Status {
156+
case kstatus.CurrentStatus:
157+
return true, nil
158+
case kstatus.InProgressStatus:
159+
return false, nil
160+
default:
161+
return false, fmt.Errorf("%s", result.Message)
162+
}
156163
}
157164
}
158165

0 commit comments

Comments
 (0)