Commit ff6331e
committed
fix: clear Result when Reconcile returns an error
Both ImageRepositoryReconciler.Reconcile and
ImagePolicyReconciler.Reconcile wrap the subreconciler with a named
return form that always emits both values:
result, retErr = r.reconcile(ctx, ...)
return
controller-runtime emits a warning when a Reconcile call returns both
a non-zero Result and a non-nil error — the Result is ignored in that
case and the object is re-queued with the error's exponential backoff.
Populating a RequeueAfter and then returning an error gives the
misleading impression that the caller's requested interval applies.
Drop the Result when there is an error so controller-runtime sees
("", retErr) and the warning no longer fires.
Fixes #661
Signed-off-by: Ali <alliasgher123@gmail.com>1 parent 4b7a59b commit ff6331e
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
| |||
0 commit comments