Shekharrajak opened a new pull request, #56639: URL: https://github.com/apache/spark/pull/56639
### What changes were proposed in this pull request? Ref https://issues.apache.org/jira/browse/SPARK-57584 This PR registers the standard gRPC health checking service for Spark Connect. Spark Connect now exposes health checks through `grpc.health.v1.Health/Check` for: - the overall gRPC server health service - the Spark Connect service name, `spark.connect.SparkConnectService` The service is initialized as `NOT_SERVING`, marked `SERVING` after Spark Connect startup completes, and marked `NOT_SERVING` during shutdown. ### Why are the changes needed? Spark Connect currently exposes Spark Connect RPCs such as `GetStatus`, but it does not expose the standard gRPC health checking protocol. This makes it difficult for Kubernetes operators and clients to distinguish between a container that is running and a Spark Connect server that is ready to accept gRPC traffic. Adding the standard gRPC health service provides a lightweight readiness signal that can be used by Kubernetes gRPC probes and other gRPC-aware clients. ### Does this PR introduce _any_ user-facing change? Yes. Spark Connect servers now expose the standard gRPC health checking service. Existing Spark Connect APIs are unchanged. Before this change, clients could only infer readiness by opening the port or attempting Spark Connect RPCs. After this change, clients and Kubernetes probes can call the standard gRPC health check and receive `SERVING` once Spark Connect startup has completed. ### How was this patch tested? Added a test in `SparkConnectServiceInternalServerSuite` that starts Spark Connect, creates a real `HealthGrpc` client, and verifies that both the default health check and the Spark Connect service-specific health check return `SERVING`. ``` build/sbt connect/Test/compile build/sbt 'connect/testOnly org.apache.spark.sql.connect.service.SparkConnectServiceInternalServerSuite -- -z "standard gRPC health"' ``` ### Was this patch authored or co-authored using generative AI tooling? Yes -- 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]
