flaming-archer opened a new pull request, #11556:
URL: https://github.com/apache/gravitino/pull/11556

   
   ### What changes were proposed in this pull request?
   
   1、Add IcebergHealthOperations — GET /iceberg/health, returns {"status": 
"UP"}, located in org.apache.gravitino.iceberg.service.rest package, 
auto-discovered via Jersey package scanning.
   
   2、Add LanceHealthOperations — GET /lance/health, returns {"status": "UP"}, 
located in org.apache.gravitino.lance.service.rest package, similarly 
auto-discovered.
   
   3、Update AuthenticationFilter — Skip authentication in doFilter() for 
/iceberg/health and /lance/health, allowing Kubernetes probes and monitoring 
systems to check service status without credentials. Also removed the dead 
constant HEALTH_CHECK_PATH = "/health" which had no corresponding endpoint.
   
   4、Add unit tests:
   TestIcebergHealthOperations — verifies health endpoint returns 200 and 
{"status": "UP"}
   TestLanceHealthOperations — same
   TestAuthenticationFilter — two new test cases verifying /iceberg/health and 
/lance/health properly bypass authentication
   
   ### Why are the changes needed?
   
   The Iceberg and Lance REST servers currently expose no health check 
endpoints. In Kubernetes deployments, this prevents liveness/readiness probes 
from working correctly, and load balancers and monitoring systems cannot verify 
service status without hitting authenticated endpoints. Adding a simple health 
check and bypassing authentication enables operators to reliably monitor 
service health in production.
   
   Fix: #(#11153 )
   
   ### Does this PR introduce _any_ user-facing change?
   
   Two new REST API endpoints:
   
   - GET /iceberg/health — returns 200 OK + {"status": "UP"}
   - GET /lance/health — returns 200 OK + {"status": "UP"}
   
   No configuration changes required; both endpoints are available immediately 
once the servers start.
   
   ### How was this patch tested?
   
   - TestIcebergHealthOperations — covers normal response, path matching, 
Content-Type validation
   - TestLanceHealthOperations — same
   - TestAuthenticationFilter.testDoFilterSkipsHealthCheckEndpoint — verifies 
/iceberg/health bypasses auth
   - TestAuthenticationFilter.testDoFilterSkipsHealthCheckEndpointWithPrefix — 
verifies /lance/health bypasses auth
   - ./gradlew :server-common:spotlessApply 
:iceberg:iceberg-rest-server:spotlessApply 
:lance:lance-rest-server:spotlessApply all pass
   


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