gyfora commented on code in PR #740:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/740#discussion_r1448906275
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkService.java:
##########
@@ -369,16 +370,17 @@ protected void cancelJob(
deleteClusterDeployment(
deployment.getMetadata(), deploymentStatus,
conf, true);
}
+
deploymentStatus.getJobStatus().setState(JobStatus.FINISHED.name());
break;
case LAST_STATE:
deleteClusterDeployment(
deployment.getMetadata(), deploymentStatus, conf,
false);
+
deploymentStatus.getJobStatus().setState(JobStatus.FINISHED.name());
break;
default:
throw new RuntimeException("Unsupported upgrade mode " +
upgradeMode);
}
}
- deploymentStatus.getJobStatus().setState(JobStatus.FINISHED.name());
Review Comment:
The problem with this and which also complicates the PR is that in some
cases the job is already finished / failed or other terminal state in which
case no action was taken and we should leave the status as is.
As you said, it's a lot more simpler to simply set the state to "FINISHED"
after cancellation :)
--
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]