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


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java:
##########
@@ -633,8 +623,26 @@ public Optional<Savepoint> getLastCheckpoint(JobID jobId, 
Configuration conf) th
                                                                             
.FIELD_NAME_EXTERNAL_PATH)
                                                             .asText()));
 
+            if (latestCheckpointOpt.isEmpty()) {
+                // Use restore checkpoint instead
+                LOG.info(
+                        "Could not find any checkpoints in the history, 
returning restore checkpoint if present");
+                latestCheckpointOpt = 
checkpoints.getRestorePath().map(Savepoint::of);
+            }
+
             if (!latestCheckpointOpt.isPresent()) {
-                LOG.warn("Could not find any externally addressable 
checkpoints.");
+                LOG.warn("Could not find any checkpoints.");
+            }
+
+            if (latestCheckpointOpt.isPresent()
+                    && latestCheckpointOpt
+                            .get()
+                            .equals(

Review Comment:
   Good catch I was planning to add a test for this anyways :)



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