milindl opened a new pull request, #1168:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1168

   ## What is the purpose of the change
   
   Suspending a job through an asynchronous cancellation left the resource 
reporting the UPGRADING lifecycle state forever. An example that reproduces 
this exists in the ticket. 
   
   I experienced it with FlinkSessionJobs (stateless or last-state upgrade 
mode), but even FlinkDeployments in application mode will suffer this (if 
`kubernetes.operator.job.upgrade.last-state.job-cancel.enabled` and 
`upgradeMode` is `last-state` for example).
   
   Savepoint upgrades complete synchronously and are not affected.
   
   
   ## Brief change log
   
     - In the observer, after marking resource suspended, we check if a user 
has set the desired state of the job to SUSPENDED and whether it's UPGRADING, 
and if so, mark the spec as stable and set `ReconciliationState.DEPLOYED`. 
    
   There is one related issue I did not solve: onTargetJobNotFound also calls 
markSuspended without completing the upgrade, so a stateless session job whose 
Flink job vanishes from the cluster mid-cancel (e.g. JM failover) will be stuck 
in UPGRADING.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - Added unit tests for the observer.
     - Added tests to FlinkSessionJobControllerTest and 
FlinkDeploymentControllerTest. 
     - Manual verification by suspending a session job and observing the output 
of `kubectl get flinksessionjobs`.
   
   ## 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: I'd say so 
yes for session jobs
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no


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