Skip to content

Add Spring Boot Actuator for health endpoint#36

Open
jmjava wants to merge 1 commit intoembabel:mainfrom
jmjava:feature/add-actuator-health-endpoint
Open

Add Spring Boot Actuator for health endpoint#36
jmjava wants to merge 1 commit intoembabel:mainfrom
jmjava:feature/add-actuator-health-endpoint

Conversation

@jmjava
Copy link
Contributor

@jmjava jmjava commented Mar 1, 2026

Resolves #33

  • Add spring-boot-starter-actuator dependency
  • Expose /actuator/health and /actuator/info endpoints
  • Configure security to permit actuator endpoints without auth
  • Add ActuatorSecurityTest with 4 regression tests
  • Configure health details to show only when authorized

This provides a proper health check endpoint for CI/CD workflows, monitoring, and orchestration instead of the /api/v1/data/stats workaround currently used by the export-seed workflow.

Note: /api/v1/data/stats intentionally remains permitAll() for now. The export-seed CI workflow polls it for readiness detection. A follow-up should:

  1. Update export-seed.yml to poll /actuator/health for readiness
  2. Move /api/v1/data/stats behind auth (remove from permitAll)

This is safe because IngestionRunner is an ApplicationRunner, so the app only accepts requests after ingestion completes — /actuator/health has the same readiness semantics as /api/v1/data/stats. No changes needed to IngestionRunner — it calls dataManager.getStats() directly (in-process), not the HTTP endpoint.

All tests pass.

Resolves embabel#33

- Add spring-boot-starter-actuator dependency
- Expose /actuator/health and /actuator/info endpoints
- Configure security to permit actuator endpoints without auth
- Add ActuatorSecurityTest with 4 regression tests
- Configure health details to show only when authorized

This provides a proper health check endpoint for CI/CD workflows,
monitoring, and orchestration instead of the /api/v1/data/stats
workaround currently used by the export-seed workflow.

Note: /api/v1/data/stats intentionally remains permitAll() for now.
The export-seed CI workflow polls it for readiness detection.
A follow-up should:
  1. Update export-seed.yml to poll /actuator/health for readiness
  2. Move /api/v1/data/stats behind auth (remove from permitAll)

This is safe because IngestionRunner is an ApplicationRunner, so
the app only accepts requests after ingestion completes —
/actuator/health has the same readiness semantics as /api/v1/data/stats.
No changes needed to IngestionRunner — it calls dataManager.getStats()
directly (in-process), not the HTTP endpoint.

All 96 tests pass.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Spring Boot Actuator for health endpoint

1 participant