gyfora commented on code in PR #165: URL: https://github.com/apache/flink-kubernetes-operator/pull/165#discussion_r851912734
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/deployment/ApplicationObserver.java: ########## @@ -70,23 +70,28 @@ protected Optional<String> updateJobStatus( } @Override - public void observeIfClusterReady( - FlinkDeployment flinkApp, Context context, Configuration lastValidatedConfig) { + protected boolean observeFlinkCluster( + FlinkDeployment flinkApp, Context context, Configuration deployedConfig) { + + JobStatus jobStatus = flinkApp.getStatus().getJobStatus(); + boolean jobFound = jobStatusObserver.observe( - flinkApp.getStatus().getJobStatus(), - lastValidatedConfig, - new ApplicationObserverContext(flinkApp, context, lastValidatedConfig)); + jobStatus, + deployedConfig, + new ApplicationObserverContext(flinkApp, context, deployedConfig)); if (jobFound) { savepointObserver - .observe( - flinkApp.getStatus().getJobStatus().getSavepointInfo(), - flinkApp.getStatus().getJobStatus().getJobId(), - lastValidatedConfig) + .observe(jobStatus.getSavepointInfo(), jobStatus.getJobId(), deployedConfig) .ifPresent( error -> ReconciliationUtils.updateForReconciliationError( flinkApp, error)); } + return isJobReady(jobStatus); + } + + private boolean isJobReady(JobStatus jobStatus) { + return org.apache.flink.api.common.JobStatus.RUNNING.name().equals(jobStatus.getState()); Review Comment: yes I will add a Jira for this before merging -- 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