You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "luca-p-castelli (via GitHub)" <gi...@apache.org> on 2025/02/18 17:04:40 UTC

[PR] [FLINK-37320] [Observer] FINISHED finite streaming jobs incorrectly being set to RECONCILING [flink-kubernetes-operator]

luca-p-castelli opened a new pull request, #944:
URL: https://github.com/apache/flink-kubernetes-operator/pull/944

   ## What is the purpose of the change
   
   This pull request fixes a bug where the observer tries changing the JOB STATUS of a FINISHED finite/bounded streaming job back to RECONCILING if the JM is MISSING.
   
   ## Brief change log
   Wraps [AbstractFlinkDeploymentObserver.observeJmDeployment](https://github.com/apache/flink-kubernetes-operator/blob/main/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/deployment/AbstractFlinkDeploymentObserver.java#L155) in an if-statement that only executes if the job is NOT in a terminal state.
   
   ## Verifying this change
   This change is a trivial rework / code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): No
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: No
     - Core observer or reconciler logic that is regularly executed: Yes
   
   ## Documentation
     - Does this pull request introduce a new feature? No
     - If yes, how is the feature documented? not applicable
   


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-37320] [Observer] FINISHED finite streaming jobs incorrectly being set to RECONCILING [flink-kubernetes-operator]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #944:
URL: https://github.com/apache/flink-kubernetes-operator/pull/944


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-37320] [Observer] FINISHED finite streaming jobs incorrectly being set to RECONCILING [flink-kubernetes-operator]

Posted by "luca-p-castelli (via GitHub)" <gi...@apache.org>.
luca-p-castelli commented on code in PR #944:
URL: https://github.com/apache/flink-kubernetes-operator/pull/944#discussion_r1961786978


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/deployment/AbstractFlinkDeploymentObserver.java:
##########
@@ -152,7 +152,10 @@ protected void observeJmDeployment(FlinkResourceContext<FlinkDeployment> ctx) {
         }
 
         deploymentStatus.setJobManagerDeploymentStatus(JobManagerDeploymentStatus.MISSING);
-        deploymentStatus.getJobStatus().setState(JobStatus.RECONCILING);
+
+        if (!ReconciliationUtils.isJobInTerminalState(deploymentStatus)) {
+            deploymentStatus.getJobStatus().setState(JobStatus.RECONCILING);

Review Comment:
   All done. Happy to make any other changes.



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-37320] [Observer] FINISHED finite streaming jobs incorrectly being set to RECONCILING [flink-kubernetes-operator]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #944:
URL: https://github.com/apache/flink-kubernetes-operator/pull/944#discussion_r1960993002


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/deployment/AbstractFlinkDeploymentObserver.java:
##########
@@ -152,7 +152,10 @@ protected void observeJmDeployment(FlinkResourceContext<FlinkDeployment> ctx) {
         }
 
         deploymentStatus.setJobManagerDeploymentStatus(JobManagerDeploymentStatus.MISSING);
-        deploymentStatus.getJobStatus().setState(JobStatus.RECONCILING);
+
+        if (!ReconciliationUtils.isJobInTerminalState(deploymentStatus)) {
+            deploymentStatus.getJobStatus().setState(JobStatus.RECONCILING);

Review Comment:
   Can you please add a unit test to guard this change against accidental future regressions?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-37320] [Observer] FINISHED finite streaming jobs incorrectly being set to RECONCILING [flink-kubernetes-operator]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on PR #944:
URL: https://github.com/apache/flink-kubernetes-operator/pull/944#issuecomment-2671597770

   rebase on main for docker fix


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org