morhidi commented on a change in pull request #38:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/38#discussion_r821090681



##########
File path: 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/BaseReconciler.java
##########
@@ -66,4 +69,30 @@ private DeleteControl shutdownAndDelete(
     }
 
     protected abstract void shutdown(FlinkDeployment flinkApp, Configuration 
effectiveConfig);
+
+    protected void updateForSpecReconciliationSuccess(FlinkDeployment 
flinkApp) {
+        ReconciliationStatus reconciliationStatus = 
flinkApp.getStatus().getReconciliationStatus();
+        reconciliationStatus.setSuccess(true);
+        reconciliationStatus.setError(null);
+
+        if (reconciliationStatus.getLastReconciledSpec() != null) {
+            int oldSavepointGeneration =
+                    
reconciliationStatus.getLastReconciledSpec().getJob().getSavepointGeneration();
+            FlinkDeploymentSpec cloned = CloneUtils.clone(flinkApp.getSpec());
+            cloned.getJob().setSavepointGeneration(oldSavepointGeneration);
+            reconciliationStatus.setLastReconciledSpec(cloned);
+        } else {
+            reconciliationStatus.setLastReconciledSpec(flinkApp.getSpec());

Review comment:
       done




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