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

   ## Why are the changes needed?
   
   Spark 4.1 introduced `spark.kubernetes.driver.annotateExitException` 
([SPARK-52068](https://github.com/apache/spark/pull/52068)). When enabled, 
Spark annotates the driver pod with `spark.exit-exception` containing the 
stringified exit exception. Unlike YARN's diagnostics field, Kubernetes has no 
native equivalent, so users currently must inspect logs to find the root cause 
of a failure.
   
   This PR teaches Kyuubi to read the `spark.exit-exception` annotation and 
include it as `ExitException` in the application error JSON. The enriched error 
is surfaced through the batch REST API (`appDiagnostic`) and the session 
exception message in `EngineRef`, making the root cause visible without log 
inspection.
   
   ## How was this patch tested?
   
   Added a unit test in `KubernetesApplicationOperationSuite` that:
   - Builds a `Failed` pod with the `spark.exit-exception` annotation set and 
asserts the error JSON contains `ExitException` with the annotation value.
   - Builds a `Failed` pod without the annotation and asserts the existing 
error JSON format is unchanged (backward compatible).
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: Claude:claude-sonnet-4-6


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