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/02/23 09:32:41 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a change in pull request #13: [FLINK-26236] Track and cap retries in ReconciliationStatus

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



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/FlinkDeploymentController.java
##########
@@ -94,51 +94,23 @@ public DeleteControl cleanup(FlinkDeployment flinkApp, Context context) {
     @Override
     public UpdateControl<FlinkDeployment> reconcile(FlinkDeployment flinkApp, Context context) {
         LOG.info("Reconciling {}", flinkApp.getMetadata().getName());
-        if (flinkApp.getStatus() == null) {
-            flinkApp.setStatus(new FlinkDeploymentStatus());
-        }
 
         Configuration effectiveConfig = FlinkUtils.getEffectiveConfig(flinkApp);
-
-        boolean successfulObserve = observer.observeFlinkJobStatus(flinkApp, effectiveConfig);
-
-        if (!successfulObserve) {
-            // Cluster not accessible let's retry
-            return UpdateControl.<FlinkDeployment>noUpdate()
-                    .rescheduleAfter(OBSERVE_REFRESH_SECONDS, TimeUnit.SECONDS);
-        }
-
-        if (!specChanged(flinkApp)) {
-            // Successfully observed the cluster after reconciliation, no need to reschedule
-            return UpdateControl.updateStatus(flinkApp);
-        }
-
         try {
-            reconcileFlinkDeployment(operatorNamespace, flinkApp, effectiveConfig);
-        } catch (Exception e) {
-            String err = "Error while reconciling deployment change: " + e.getMessage();
-            String lastErr = flinkApp.getStatus().getReconciliationStatus().getError();
-            if (!err.equals(lastErr)) {
-                // Log new errors on the first instance
-                LOG.error("Error while reconciling deployment change", e);
-                updateForReconciliationError(flinkApp, err);
-                return UpdateControl.updateStatus(flinkApp)
-                        .rescheduleAfter(RECONCILE_ERROR_REFRESH_SECONDS, TimeUnit.SECONDS);
-            } else {
-                return UpdateControl.<FlinkDeployment>noUpdate()
-                        .rescheduleAfter(RECONCILE_ERROR_REFRESH_SECONDS, TimeUnit.SECONDS);
+            boolean successfulObserve = observer.observeFlinkJobStatus(flinkApp, effectiveConfig);

Review comment:
       Yes the TimeoutException case should be solved as part of the ticket Thomas is working on. Let's leave this as is now, and we can improve later as we see fit from experience.




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