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:17:38 UTC

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

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



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/FlinkDeploymentController.java
##########
@@ -178,7 +150,14 @@ private void updateForReconciliationError(FlinkDeployment flinkApp, String err)
     @Override
     public Optional<FlinkDeployment> updateErrorStatus(
             FlinkDeployment flinkApp, RetryInfo retryInfo, RuntimeException e) {
-        LOG.warn("TODO: handle error status");
-        return Optional.empty();
+        LOG.warn(
+                "attempt count: {}, last attempt: {}",
+                retryInfo.getAttemptCount(),
+                retryInfo.isLastAttempt());
+
+        updateForReconciliationError(
+                flinkApp,
+                (e instanceof ReconciliationException) ? e.getCause().toString() : e.toString());

Review comment:
       Good question, when tested I got null in the message field if the job was not running. So the toString() seemed to be more informative. At least it gives you the class `java.util.concurrent.TimeoutException`. 
   public String toString() {
           String s = getClass().getName();
           String message = getLocalizedMessage();
           return (message != null) ? (s + ": " + message) : s;
   }




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