gyfora commented on code in PR #755: URL: https://github.com/apache/flink-kubernetes-operator/pull/755#discussion_r1464380455
########## flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/reconciler/ReconciliationMetadata.java: ########## @@ -42,6 +42,7 @@ public class ReconciliationMetadata { public static ReconciliationMetadata from(AbstractFlinkResource<?, ?> resource) { ObjectMeta metadata = new ObjectMeta(); metadata.setGeneration(resource.getMetadata().getGeneration()); + resource.getStatus().setObservedGeneration(resource.getMetadata().getGeneration()); Review Comment: I would move this code to: `ReconciliationStatus#serializeAndSetLastReconciledSpec` and `ReconciliationUtils#updateReconciliationMetadata` that way it's a bit more intuitive when the setting of the generation happens. It's a bit unexpected that a constructor method for `ReconciliationMetadata` mutates the resources here. I know that my suggestion will actually duplicate the setting of the observedGeneration in the status but I think it will be cleaner once we remove the now deprecated meta generation field :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org