source-controller/internal/reconcile
Sunny 321317971f
reconcile: Set observed gen when conditions exist
The observed generation must be set only when actual observation is
made. When an actual observation is made, some conditions are set on the
object. Introduce a helper function
addPatchOptionWithStatusObservedGeneration() to set the patcher option
WithStatusObservedGeneration only when there's any condition in the
status.

Updates the existing tests that depended on this behavior.

This fixes the issue where the observed generation is set by the patcher
when a reconciler does an early return for setting the finalizers only.
With this, the observed generation will be updated only when some
observations are made on the object based on the usual rules of success
result, no error, ignore error and stalled condition.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-25 14:28:18 +05:30
..
summarize Introduce ErrorActionHandler ResultProcessor 2022-05-20 19:52:18 +05:30
reconcile.go reconcile: Set observed gen when conditions exist 2022-05-25 14:28:18 +05:30
reconcile_test.go reconcile: Set observed gen when conditions exist 2022-05-25 14:28:18 +05:30