You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/09/26 08:32:22 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #382: [FLINK-29392] Trigger error when session job is lost without HA

gyfora commented on code in PR #382:
URL: https://github.com/apache/flink-kubernetes-operator/pull/382#discussion_r979718662


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/JobStatusObserver.java:
##########
@@ -72,22 +81,92 @@ public boolean observe(
         }
 
         if (!clusterJobStatuses.isEmpty()) {
+            // There are jobs on the cluster, we filter the ones for this resource
             Optional<JobStatusMessage> targetJobStatusMessage =
                     filterTargetJob(jobStatus, clusterJobStatuses);
+
             if (targetJobStatusMessage.isEmpty()) {
-                jobStatus.setState(org.apache.flink.api.common.JobStatus.RECONCILING.name());
+                LOG.warn("No matching jobs found on the cluster");
+                ifRunningMoveToReconciling(jobStatus, previousJobStatus);
+                // We could list the jobs but cannot find the one for this resource
+                if (resource instanceof FlinkDeployment) {
+                    // This should never happen for application clusters, there is something wrong
+                    setUnknownJobError((FlinkDeployment) resource);

Review Comment:
   Not really, this means that there was a job on the cluster that we cannot match to the application deployment. this should never happen.



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org