epugh opened a new pull request, #4171:
URL: https://github.com/apache/solr/pull/4171

   Migrates `NodeHealthAPI` — the last node-level V2 API still using Solr's 
homegrown `@EndPoint` annotation — to standard JAX-RS, following the same 
pattern as `NodeLogging`, `GetPublicKey`, etc.
   
   ## Design
   
   The logic stays in `HealthCheckHandler` (minimising diff surface). 
`NodeHealthAPI` is a thin JAX-RS wrapper (~60 lines) that delegates entirely to 
it.
   
   ## Key changes
   
   - **`solr/api`** — New `NodeHealthApi` interface (`@Path`, `@GET`, 
`@Operation`) and `NodeHealthResponse` model (`status`, `message`, 
`num_cores_unhealthy`)
   - **`NodeHealthAPI`** — Replaces `@EndPoint` with JAX-RS; injects 
`CoreContainer`, delegates to `HealthCheckHandler`
   - **`HealthCheckHandler`** — Logic unchanged; adds `public 
NodeHealthResponse checkNodeHealth(Boolean, Integer)` as the shared entry point 
for both v1 (`handleRequestBody`) and v2 (`NodeHealthAPI`); switches to 
`getJerseyResources()` / empty `getApis()`
   - **`V2NodeAPIMappingTest`** — Removes the now-obsolete `@EndPoint`/`ApiBag` 
routing test for health
   - **`NodeHealthAPITest`** — New Mockito unit tests for the API class
   - **`NodeHealthAPITest2`** — New mock-free integration tests: cloud-mode via 
real `MiniSolrCloudCluster`, legacy mode via embedded `CoreContainer` built 
from `NodeConfig`
   - **`implicit-requesthandlers.adoc`** — Health section now links to both 
`HealthCheckHandler` (v1) and `NodeHealthAPI` (v2) javadocs
   


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