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

[GitHub] [flink-kubernetes-operator] gyfora commented on a change in pull request #103: [FLINK-26830] Transition to SUSPEND before redeploying on job upgrades

gyfora commented on a change in pull request #103:
URL: https://github.com/apache/flink-kubernetes-operator/pull/103#discussion_r834033043



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/ReconciliationUtils.java
##########
@@ -93,6 +101,26 @@ public static void updateForReconciliationError(FlinkDeployment flinkApp, String
         } else {
             updateControl = UpdateControl.noUpdate();
         }
-        return updateControl;
+
+        if (!reschedule) {
+            return updateControl;
+        }
+
+        ReconciliationStatus reconciliationStatus = current.getStatus().getReconciliationStatus();
+        if (current.getSpec().getJob() != null
+                && current.getSpec().getJob().getState() == JobState.RUNNING
+                && reconciliationStatus != null
+                && reconciliationStatus.isSuccess()
+                && reconciliationStatus.getLastReconciledSpec().getJob().getState()
+                        == JobState.SUSPENDED) {
+            return updateControl.rescheduleAfter(0);

Review comment:
       Maybe there is a better way provided by the SDK  (to move to the beginning of the queue) but you could actually argue that it's better to get the new updates before finishing the upgrade, that way you wouldnt have to redeploy twice




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

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