⚠️ Maintenance suspended. Please, migrate to the active fork reconciler.io/runtime. See https://github.com/reconcilerio/runtime/releases/tag/v0.20.0 for instructions. This repository will be archived eventually.
Other
81
stars
18
forks
source link
CastResource does not keep its status update on error #473
When the reconciliation of the CastResource is erroring, and when the wrapped reconciler needs to update any field or - more commonly needed - set error condition on the resource status, the error condition does not get updated on the original resource. This is the section of code that is causing issue where updating the castOriginal happen after the error checks: cast.go
Reproduction steps
Use the CastResource with a subreconciler that marks conditions to false on error, then trigger that error intentionally. With the current behavior the condition on the original resource will not be updated to the error condition.
Describe the bug
When the reconciliation of the CastResource is erroring, and when the wrapped reconciler needs to update any field or - more commonly needed - set error condition on the resource status, the error condition does not get updated on the original resource. This is the section of code that is causing issue where updating the
castOriginal
happen after the error checks: cast.goReproduction steps
Use the CastResource with a subreconciler that marks conditions to false on error, then trigger that error intentionally. With the current behavior the condition on the original resource will not be updated to the error condition.
Expected behavior
Additional context
No response