nishita-09 opened a new pull request, #997:
URL: https://github.com/apache/flink-kubernetes-operator/pull/997

   <!--
   *Thank you very much for contributing to the Apache Flink Kubernetes 
Operator - we are happy that you want to help us improve the project. To help 
the community review your contribution in the best possible way, please go 
through the checklist below, which will get the contribution into a shape in 
which it can be best reviewed.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA 
issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are 
made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the 
pull request", where *FLINK-XXXX* should be replaced by the actual issue 
number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following 
this pattern: `[hotfix][docs] Fix typo in event time introduction` or 
`[hotfix][javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the 
pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean 
verify` passes. You can read more on how we use GitHub Actions for CI 
[here](https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/development/guide/#cicd).
   
     - Each pull request should address only one issue, not mix up code from 
multiple issues.
     
     - Each commit in the pull request has a meaningful commit message 
(including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and 
this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *Currently the lifecycle state shows STABLE even if an application 
deployment was deleted and stays in MISSING / reconciling state. This would fix 
the lifecycle status of the deployment which would be FAILED in case the JMs is 
missing or the JM is is ERROR state.*
   
   
   ## Brief change log
     - *Added logic to detect unrecoverable FlinkDeployment scenarios*
     - *Inserted after existing job status FAILED check*
     - *Checks for `JobManagerStatus`:
       - *MISSING JobManager Deployment with errors → Return FAILED lifecycle 
state*
       - *MISSING (post being stable) JobManager Deployment (no error) → Return 
FAILED lifecycle state*
       - *MISSING (before being stable) JobManager Deployment (no error) → 
Return DEPLOYED lifecycle state*
       - *ERROR JobManager Deployment -> Return FAILED lifecycle state*
   
   ## Verifying this change
   <!--
   Please make sure both new and modified tests in this PR follows the 
conventions defined in our code quality guide: 
https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
   -->
   This change added tests and can be verified as follows:
     - *Added Unit Tests in `ResourceLifecycleMetricsTest` to validate 
Lifecycle Status for `flinkDeployment`*
     - *Manually verified the change by running a cluster with 3 sets of 
Application Flink Clusters:*
       - *Application Deployment 1 -> with invalid image -> ERRORED JobManager 
Deployment Status -> FAILED Lifecycke Status of `flinkDeployment`*
       - *Application Deployment 2 -> with valid image -> Deleted `JobManager 
Deployment` ->  Caused `Missing` JM Status -> FAILED Lifecycke Status of 
`flinkDeployment`*
       - *Application Deployment 3 -> with valid image ->with invalid node 
selector -> `Jobmanager Deployment Status:` `DEPLOYING` -> Hence the Lifecycle 
Status is `STABLE`
       - 
   <img width="730" height="205" alt="Screenshot 2025-07-11 at 10 09 33 PM" 
src="https://github.com/user-attachments/assets/efc6688f-9b19-44f7-9383-b350683e9d4f";
 />
   <img width="725" height="110" alt="Screenshot 2025-07-11 at 10 09 44 PM" 
src="https://github.com/user-attachments/assets/bfc1959a-fc8d-4aa2-ad7b-f23bc743399e";
 />
   <img width="728" height="200" alt="Screenshot 2025-07-11 at 10 03 00 PM" 
src="https://github.com/user-attachments/assets/8a3a72fd-e433-4c08-bea3-2f6e7c372c97";
 />
   <img width="723" height="113" alt="Screenshot 2025-07-11 at 10 03 10 PM" 
src="https://github.com/user-attachments/assets/4c7d248c-369a-4ef1-a59e-79c3cffd2653";
 />
   <img width="729" height="59" alt="Screenshot 2025-07-11 at 10 03 16 PM" 
src="https://github.com/user-attachments/assets/64826f3d-18a9-4415-ae7f-cf5bafc00cc8";
 />
   
   
   ## 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 / docs / JavaDocs 
/ not documented)
   


-- 
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]

Reply via email to