Upgrade MicroProfile Health 2.0.1.
Overview
WildFly is providing MicroProfile Health 1.0 for applications deployed in WildFly.
MicroProfile 3.0 has been released with a new major version for MicroProfile Health 2.0.1 that contains new features and breaking changes as described in its release notes.
Issue Metadata
Issue
Related Issues
-
CLOUD-3326 - Integrate MicroProfile Health 2.0.1 HTTP endpoints in EAP probes
Dev Contacts
QE Contacts
Testing By
-
QE
Affected Projects or Components
The implementation of Eclipse MicroProfile Health is provided by smallrye-health.
smallrye-health uses CDI to discover all health check probes and provides a SmallryeHeathReporter that is @ApplicationScope-d.
WildFly extensions are not using CDI and the health probes must be available even when there is no deployed application. The microprofile-health-smallrye will provide its own "reporter" that aggreated health checks procecures when applications are deployed/undeployed.
Requirements
-
Support Eclipse MicroProfile Health 2.0.1 for applications deployed in WildFly.
-
Provide two additional HTTP endpoints
/health/liveand/health/readyto check exclusively liveness checks probes and readiness check probes. -
Provide two additional management operations
:check-liveand:check-readyto check exclusively liveness checks probes and readiness check probes. -
Repurpose the existing HTTP endpoint
/healthand:checkoperation to check all check probes (both liveness and readiness probes) -
Provides two management attributes to specify the global status when no readiness or liveness probes are defined. This allows applications to report
DOWNuntil their probes verify that the application is ready/live. By default, these attributes will reportUP.
Non Requirements
-
The integration of the health HTTP endpoints or operations in EAP or WildFly probes for Kubernetes is out of scope of this feature. It will be tracked in a separate CLOUD-3326 issue.
Implementation Plan
-
Add dependencies to
io.smallrye:smallrye-health-2.0andorg.eclipse.microprofile.health:microprofile-health-api:2.0artifacts -
Modify the HealthContextService to expose additional HTTP endpoints
/health/liveand/health/ready. -
Modify the subsystem to provide additional methods
check-readinessandcheck-liveto check exclusively resp. the readiness and liveness probes.
Subsystem description
The subsystem has 2 additional attributes:
-
empty-readiness-checks-status(UPby default) - Defines the global status returned by the/health/readyHTTP endpoint and:check-readyoperation if no readiness probes have been registered. -
empty-liveness-checks-status(UPby default) - Defines the global status returned by the/health/liveHTTP endpoint and:check-liveoperation if no readiness probes have been registered.
The /health HTTP endpoint and :check operation that checks both readiness and liveness probes also take into account these 2 attributes.
Test Plan
-
Update the
testsuite/integration/microprofile-tck/healthtest suite to ensure that WildFly is passing the MicroProfile Health Check 2.0 TCK.
Community Documentation
The feature is documented in WildFly Admin Guide in the MicroProfile Health section.