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


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/TestingFlinkService.java:
##########
@@ -448,21 +435,46 @@ public List<String> getDisposedSavepoints() {
 
     @Override
     public Optional<Savepoint> getLastCheckpoint(JobID jobId, Configuration 
conf) throws Exception {
+        jobs.stream()
+                .filter(js -> js.f1.getJobId().equals(jobId))
+                .findAny()
+                .ifPresent(
+                        t -> {
+                            if (!t.f1.getJobState().isGloballyTerminalState()) 
{

Review Comment:
   It's just a simple way to ensure that we don't build operator logic relying 
on last checkpoints when the job is not in a terminal state (because it's not 
actually guaranteed to be the latest in that case).



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