Skip to content

feat(health): add runtime‑agnostic Health SPI and Run /health endpoint#2730

Merged
kthoms merged 5 commits into
operaton:mainfrom
Fejbien:healthendpoint
Apr 17, 2026
Merged

feat(health): add runtime‑agnostic Health SPI and Run /health endpoint#2730
kthoms merged 5 commits into
operaton:mainfrom
Fejbien:healthendpoint

Conversation

@Fejbien

@Fejbien Fejbien commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

related #1245 replaces #1582

@Fejbien

Fejbien commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

The previous CI failure was just bizarre. I reran the build manually and it passed successfully here

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a runtime-agnostic health-check SPI in the engine and wires it into Spring Boot (Actuator + webapps), Operaton Run (/health), and the Quarkus extension so health reporting is consistent across deployment models.

Changes:

  • Introduce HealthService/HealthResult (+ optional FrontendHealthContributor) and a default engine implementation (DefaultHealthService) with tests.
  • Spring Boot starter: auto-configure a HealthService, contribute frontend/webapps health details, and adapt the existing ProcessEngineHealthIndicator to delegate to the SPI.
  • Quarkus + Run: add readiness health check integration (Quarkus) and a new /health REST controller + test (Run), plus dependency updates.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spring-boot-starter/starter/src/test/java/org/operaton/bpm/spring/boot/starter/actuator/ProcessEngineHealthIndicatorTest.java Updates tests for the new HealthService-backed indicator behavior.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/actuator/ProcessEngineHealthIndicator.java Makes the Spring Boot health indicator delegate status/details to HealthService.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmHealthServiceConfiguration.java Adds Spring Boot auto-config to provide a default HealthService bean.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmAutoConfiguration.java Imports the new health service configuration into starter auto-config.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmActuatorConfiguration.java Wires HealthService into Actuator health indicator registration.
spring-boot-starter/starter-webapp-core/src/main/java/org/operaton/bpm/spring/boot/starter/webapp/SpringWebappFrontendHealthContributor.java Adds webapp resource presence reporting for health details.
spring-boot-starter/starter-webapp-core/src/main/java/org/operaton/bpm/spring/boot/starter/webapp/OperatonBpmWebappAutoConfiguration.java Registers the frontend health contributor when webapps are enabled.
quarkus-extension/engine/runtime/src/main/java/org/operaton/bpm/quarkus/engine/extension/OperatonHealthCheck.java Adds a MicroProfile readiness health check that delegates to HealthService.
quarkus-extension/engine/runtime/src/main/java/org/operaton/bpm/quarkus/engine/extension/HealthServiceProducer.java Produces a CDI HealthService backed by DefaultHealthService.
quarkus-extension/engine/runtime/pom.xml Adds SmallRye Health dependency for Quarkus runtime integration.
quarkus-extension/engine/deployment/src/test/java/org/operaton/bpm/quarkus/engine/test/health/OperatonHealthCheckTest.java Adds Quarkus unit tests for health service exposure and details.
quarkus-extension/engine/deployment/pom.xml Adds SmallRye Health dependency for Quarkus deployment/testing.
engine/src/test/java/org/operaton/bpm/engine/impl/health/DefaultHealthServiceTest.java Adds unit tests for default health evaluation (DB/job executor/frontend).
engine/src/main/java/org/operaton/bpm/engine/impl/health/DefaultHealthService.java Implements the default runtime-agnostic health check.
engine/src/main/java/org/operaton/bpm/engine/health/HealthService.java Introduces the public health SPI interface.
engine/src/main/java/org/operaton/bpm/engine/health/HealthResult.java Introduces the health value object returned by the SPI.
engine/src/main/java/org/operaton/bpm/engine/health/FrontendHealthContributor.java Adds SPI for optional frontend/webapps health contributions.
distro/run/core/src/test/java/org/operaton/bpm/run/test/health/HealthEndpointTest.java Adds a Run integration test for /health JSON response.
distro/run/core/src/main/java/org/operaton/bpm/run/health/HealthController.java Adds Operaton Run /health REST endpoint backed by HealthService.
distro/run/core/pom.xml Adjusts Run core web dependency to ensure the /health endpoint can be served.

Comment thread distro/run/core/src/main/java/org/operaton/bpm/run/health/HealthController.java Outdated
Comment thread quarkus-extension/engine/runtime/pom.xml
Comment thread quarkus-extension/engine/deployment/pom.xml
Comment thread distro/run/core/pom.xml Outdated
Comment thread distro/run/core/src/main/java/org/operaton/bpm/run/health/HealthController.java Outdated
Comment thread engine/src/main/java/org/operaton/bpm/engine/health/HealthResult.java Outdated
@kthoms

kthoms commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

@Fejbien I did some polishing and had a rough look. I will continue soon with the review.

@kthoms kthoms added the noteworthy Should be documented in the release notes label Apr 15, 2026
@kthoms kthoms added this to the 2.1.0 milestone Apr 15, 2026
@kthoms kthoms requested a review from Copilot April 17, 2026 05:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Introduces a runtime-agnostic health SPI (HealthService/HealthResult) and wires it into Spring Boot Actuator, Quarkus MicroProfile Health, and Operaton Run’s /health REST endpoint to provide consistent health reporting across runtimes.

Changes:

  • Added HealthService SPI, HealthResult value type, and a default implementation (DefaultHealthService) in the engine.
  • Updated Spring Boot actuator integration to use HealthService and added a webapps frontend health contributor.
  • Added Quarkus readiness health check + producer and introduced Operaton Run /health controller with tests.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spring-boot-starter/starter/src/test/java/org/operaton/bpm/spring/boot/starter/actuator/ProcessEngineHealthIndicatorTest.java Updates tests to cover HealthService-driven actuator status mapping.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/actuator/ProcessEngineHealthIndicator.java Uses HealthService result to set actuator status/details.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmHealthServiceConfiguration.java Registers DefaultHealthService as a Spring bean when missing.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmAutoConfiguration.java Imports health service configuration into starter auto-config.
spring-boot-starter/starter/src/main/java/org/operaton/bpm/spring/boot/starter/OperatonBpmActuatorConfiguration.java Wires HealthService into ProcessEngineHealthIndicator bean setup.
spring-boot-starter/starter-webapp-core/src/test/java/org/operaton/bpm/spring/boot/starter/webapp/SpringWebappFrontendHealthContributorTest.java Adds tests for frontend/webapps health contributor behavior.
spring-boot-starter/starter-webapp-core/src/main/java/org/operaton/bpm/spring/boot/starter/webapp/SpringWebappFrontendHealthContributor.java Implements frontend health contributor by checking webjar resources.
spring-boot-starter/starter-webapp-core/src/main/java/org/operaton/bpm/spring/boot/starter/webapp/OperatonBpmWebappAutoConfiguration.java Exposes frontend health contributor bean when webapp is enabled.
quarkus-extension/engine/runtime/src/main/java/org/operaton/bpm/quarkus/engine/extension/OperatonHealthCheck.java Adds MicroProfile readiness health check backed by HealthService.
quarkus-extension/engine/runtime/src/main/java/org/operaton/bpm/quarkus/engine/extension/HealthServiceProducer.java Produces a CDI HealthService (default engine health service).
quarkus-extension/engine/runtime/pom.xml Adds SmallRye Health dependency for runtime health check.
quarkus-extension/engine/deployment/src/test/java/org/operaton/bpm/quarkus/engine/test/health/OperatonHealthCheckTest.java Adds Quarkus tests verifying health service availability and details.
quarkus-extension/engine/deployment/pom.xml Adds SmallRye Health dependency for deployment/test module.
engine/src/test/java/org/operaton/bpm/engine/impl/health/DefaultHealthServiceTest.java Adds unit tests for the new default health service.
engine/src/main/java/org/operaton/bpm/engine/impl/health/DefaultHealthService.java Implements runtime-agnostic health logic (DB, JobExecutor, frontend).
engine/src/main/java/org/operaton/bpm/engine/health/HealthService.java Introduces the health SPI interface.
engine/src/main/java/org/operaton/bpm/engine/health/HealthResult.java Adds the health result record used across runtimes.
engine/src/main/java/org/operaton/bpm/engine/health/FrontendHealthContributor.java Adds SPI for contributing frontend/webapps health details.
distro/run/core/src/test/java/org/operaton/bpm/run/test/health/HealthEndpointTest.java Adds integration test for Operaton Run /health endpoint.
distro/run/core/src/test/java/org/operaton/bpm/run/test/health/HealthControllerTest.java Adds MVC tests for HTTP status mapping and JSON body of /health.
distro/run/core/src/main/java/org/operaton/bpm/run/health/HealthController.java Implements Operaton Run /health REST endpoint backed by HealthService.
distro/run/core/pom.xml Switches to spring-boot-starter-web and adds MVC test starter for /health.

Comment thread engine/src/main/java/org/operaton/bpm/engine/health/HealthResult.java Outdated
Comment thread quarkus-extension/engine/runtime/pom.xml
@kthoms

kthoms commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

@Fejbien I have polished the changes. Looks fine for me know.

fabian.sucholas and others added 5 commits April 17, 2026 12:35
- C1: HealthController returns HTTP 503 when status is not UP
- C2: document that job executor state is informational only; status
  is determined solely by database connectivity (Operaton is UP even
  if the job executor is not running)
- C3: expand HealthService Javadoc to explain DI-over-ServiceLoader
  design decision for SPI extensibility
- I1: ProcessEngineHealthIndicator handles UNKNOWN and custom statuses
  without mapping them to DOWN
- I3: Quarkus HealthServiceProducer now injects ProcessEngine and
  extracts JobExecutor from its configuration instead of passing null
- I4: add HealthControllerTest with @WebMvcTest covering 200/503 cases;
  add spring-boot-starter-webmvc-test to distro/run/core test scope
- I5: document why @ConditionalOnBean replaces @dependsOn in
  OperatonBpmActuatorConfiguration
- M1: validate status is non-null in HealthResult compact constructor
- M2: fix DefaultHealthServiceTest to stub jobExecutor.isActive() and
  add test verifying UP status when job executor is inactive
- M3: add SpringWebappFrontendHealthContributorTest
- M4: improve pom.xml comment on spring-boot-starter-web dependency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kthoms kthoms merged commit 7ab291e into operaton:main Apr 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

noteworthy Should be documented in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants