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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]