Update status.ObservedGeneration for sources resources when sources r…#1897
Conversation
…esources get reconciled successfully, added unit tests
|
/assign @Harwayne |
| return err | ||
| } | ||
| source.Status.MarkEventTypes() | ||
| source.Status.ObservedGeneration = source.Generation |
There was a problem hiding this comment.
Should this be at the beginning of the reconcile loop? My reasoning being that whatever status this reconcile loop returns, it is associated with source.Generation, not whatever the old value of source.Status.ObservedGeneration was.
There was a problem hiding this comment.
Discussed offline. At first, I followed the logic when knative serving update the Status.ObservedGeneration for resources. Talked with devs of Knative serving, they said they will work on update the Status.ObservedGeneration for resources at the beginning of the reconcile loop instead of at the end of the reconcile loop because that's the definition of ObservedGeneration( ObservedGeneration is the 'Generation' of the Service that was last processed by the controller). ObservedGeneration is the 'Generation' of the Service that was last processed by the controller no matter the reconcile is successful or not. Will change the code to update at the beginning of the reconcile loop.
|
The following is the coverage report on pkg/.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: capri-xiyue, Harwayne The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Setting to 1.21 (matching ocp 4.8) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * updating patch as source of this change as well Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Fixes #1893
Proposed Changes
Release Note