morhidi commented on code in PR #366:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/366#discussion_r969450732


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/StatusRecorder.java:
##########
@@ -140,6 +141,9 @@ public void updateStatusFromCache(CR resource) {
         } else {
             // Initialize cache with current status copy
             statusCache.put(key, 
objectMapper.convertValue(resource.getStatus(), ObjectNode.class));
+            if 
(ResourceLifecycleState.CREATED.equals(resource.getStatus().getLifecycleState()))
 {
+                statusUpdateListener.accept(resource, resource.getStatus());

Review Comment:
   I added the if condition to avoid sending status updates for those CRs the 
operator already reconciled. If the restart happens between detection of the CR 
and the observe phase, then we'll send a duplicate status with:
   `The resource was created in Kubernetes but not yet handled by the 
operator`.  Which is still valid.



-- 
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

Reply via email to