lajith2006 commented on code in PR #957:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/957#discussion_r2119467587


##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/status/FlinkDeploymentStatus.java:
##########
@@ -55,4 +63,146 @@ public class FlinkDeploymentStatus extends 
CommonStatus<FlinkDeploymentSpec> {
 
     /** Information about the TaskManagers for the scale subresource. */
     private TaskManagerInfo taskManager;
+
+    /** Condition of the CR . */
+    private List<Condition> conditions = new ArrayList<>();
+
+    public List<Condition> getConditions() {
+        if (reconciliationStatus != null
+                && reconciliationStatus.deserializeLastReconciledSpec() != null
+                && 
reconciliationStatus.deserializeLastReconciledSpec().getJob() == null) {

Review Comment:
   If we derive the mode from Jobstatus.state, it looks like , there is a 
chance of misleading information in the condition status. 
   
   For example, it is observed that, when an existing session cluster is 
updated with some information , for example with checkpoint interval changed to 
new value, we can see that state is updated with value as FINISHED as below 
   
   status:
     clusterInfo:
     jobManagerDeploymentStatus: READY
     jobStatus:
       checkpointInfo:
         lastPeriodicCheckpointTimestamp: 0
       savepointInfo:
         lastPeriodicSavepointTimestamp: 0
         savepointHistory: []
       state: FINISHED
   
   So, if we derive the running state from JobStatus, by looking at the state 
value , we end up condition for above as Running false. But if we look at the  
jobManagerDeploymentStatus: READY, we are supposed to say that condition as 
Running true as it is session cluster, and it's  says that session is ready to 
receive the request.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to