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


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/SnapshotObserver.java:
##########
@@ -74,8 +80,32 @@ public void observeSavepointStatus(FlinkResourceContext<CR> 
ctx) {
         cleanupSavepointHistory(ctx, savepointInfo);
     }
 
+    public void observeCheckpointStatus(FlinkResourceContext<CR> ctx) {
+        if (!isCheckpointsTriggeringSupported(ctx.getObserveConfig())) {
+            return;
+        }
+        var resource = ctx.getResource();
+        var jobStatus = resource.getStatus().getJobStatus();
+        var checkpointInfo = jobStatus.getSavepointInfo();
+        var jobId = jobStatus.getJobId();
+
+        // If any manual or periodic savepoint is in progress, observe it
+        if (SnapshotUtils.checkpointInProgress(jobStatus)) {
+            observeTriggeredCheckpoint(ctx, jobId);
+        }
+
+        // REVIEW: clarify if this is relevant for checkpoints.
+        /*
+        // If job is in globally terminal state, observe last savepoint
+        if (ReconciliationUtils.isJobInTerminalState(resource.getStatus())) {
+            observeLatestCheckpoint(
+                    ctx.getFlinkService(), checkpointInfo, jobId, 
ctx.getObserveConfig());
+        }
+        */

Review Comment:
   yes, I believe so



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