gyfora commented on code in PR #252: URL: https://github.com/apache/flink-kubernetes-operator/pull/252#discussion_r888760743
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java: ########## @@ -354,8 +355,54 @@ protected ClusterClient<String> getClusterClient(Configuration config) throws Ex } public void cancelJob(FlinkDeployment deployment, UpgradeMode upgradeMode) throws Exception { - var conf = configManager.getObserveConfig(deployment); - var deploymentStatus = deployment.getStatus(); + Optional<String> savepointOpt = Optional.empty(); + + Configuration conf = null; + FlinkDeploymentStatus deploymentStatus = deployment.getStatus(); + try { + conf = configManager.getObserveConfig(deployment); + savepointOpt = cancelJob(deployment, upgradeMode, conf, deploymentStatus); + } catch (LastReconciledSpecException e) { + LOG.warn("Last reconciled spec is null", e); Review Comment: Why would we cancel the job if last reconciled spec is null? that means it was never deployed -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org