rgsriram commented on code in PR #438:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/438#discussion_r1034773811
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkService.java:
##########
@@ -362,11 +362,22 @@ public void cancelSessionJob(
FlinkSessionJob sessionJob, UpgradeMode upgradeMode, Configuration
conf)
throws Exception {
- var jobStatus = sessionJob.getStatus().getJobStatus();
+ var sessionJobStatus = sessionJob.getStatus();
+ var jobStatus = sessionJobStatus.getJobStatus();
var jobIdString = jobStatus.getJobId();
Preconditions.checkNotNull(jobIdString, "The job to be suspend should
not be null");
var jobId = JobID.fromHexString(jobIdString);
Optional<String> savepointOpt = Optional.empty();
+
+ if (ReconciliationUtils.isJobInTerminalState(sessionJobStatus)) {
+ LOG.info("Job is already in terminal state. JobID {}",
jobId.toHexString());
+ return;
+ } else if (!ReconciliationUtils.isJobRunning(sessionJobStatus)) {
Review Comment:
@gyfora - The build pipeline is failing with the below error. At this place:
https://github.com/apache/flink-kubernetes-operator/actions/runs/3574448062/jobs/6009735670.
Could you please help me here? Not sure if re-triggering solves it.
```
flinkdeployment.flink.apache.org "session-cluster-1" deleted
flinksessionjob.flink.apache.org "flink-example-statemachine" deleted
persistentvolumeclaim "session-cluster-1-pvc" deleted
ingressclass.networking.k8s.io "nginx" deleted
No resources found
Error: Process completed with exit code 1.
```
--
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]