ruanwenjun opened a new pull request, #7632:
URL: https://github.com/apache/kyuubi/pull/7632

   ### Why are the changes needed?
   
   When a Kubernetes shared informer starts, its initial LIST is delivered to 
the event handler as ADD events. The existing ADD handler updated application 
state but did not mark an already terminated driver pod for cleanup. Cleanup 
instead depended on a separate asynchronous, one-shot LIST. If that LIST 
failed, it was not retried, and terminated pods discovered by the informer were 
never scheduled for cleanup.
   
   This patch lets ADD events reuse the existing terminated-application cleanup 
path and removes the redundant initialization LIST and its executor. The 
informer remains responsible for listing and watching pods, including its 
normal LIST retry behavior.
   
   This PR only addresses startup reconciliation of terminated driver pods. 
Coordinating cleanup across multiple Kyuubi servers remains a separate concern.
   
   ### How was this patch tested?
   
   Added `mark terminated application received from pod add event` to verify 
that a succeeded Spark driver pod received through ADD is registered in the 
terminated-application cleanup trigger. The test fails without the production 
change and passes with it.
   
   ```bash
   dev/reformat
   build/mvn test -pl kyuubi-server -am 
-Pspark-provided,flink-provided,hive-provided -Dtest=none 
-DwildcardSuites=org.apache.kyuubi.engine.KubernetesApplicationOperationSuite
   git diff --check
   ```
   
   All 6 tests in `KubernetesApplicationOperationSuite` passed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: Codex:GPT-5
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to