Skip to content

Commit

Permalink
Merge pull request #304 from xstefank/issue-302
Browse files Browse the repository at this point in the history
Rename /health/start to /health/started
  • Loading branch information
xstefank authored Jun 8, 2021
2 parents 054fac0 + 63214e1 commit eba7a4c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion spec/src/main/asciidoc/overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-read

In this scenario health checks are used to determine if a computing node needs to be discarded (terminated, shutdown) and eventually replaced by another (healthy) instance.

The MicroProfile Health architecture consists of three `/health/ready`, `/health/live` and `/health/start` endpoints in a MicroProfile runtime that respectively represent the readiness, the liveness and the startup health of the entire runtime.
The MicroProfile Health architecture consists of three `/health/ready`, `/health/live` and `/health/started` endpoints in a MicroProfile runtime that respectively represent the readiness, the liveness and the startup health of the entire runtime.
These endpoints are linked to health check procedures defined with specifications API and annotated respectively with `@Readiness`, `@Liveness` and `@Startup` annotations.

A 4th endpoint `/health` is also available and can be used to provide a combination of the previous endpoints.
Expand Down
12 changes: 6 additions & 6 deletions spec/src/main/asciidoc/protocol-wireformat.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Aspects regarding the secure access of health check information.
| Readiness
| See Appendix B

| /health/start
| /health/started
| GET
| 200, 500, 503
| Startup
Expand Down Expand Up @@ -255,7 +255,7 @@ The following table gives valid health check responses for all kinds of health c
| Request | HTTP Status | JSON Payload | Status | Comment
| /health/live
/health/ready
/health/start
/health/started
/health
| 200
| Yes
Expand All @@ -264,7 +264,7 @@ The following table gives valid health check responses for all kinds of health c

| /health/live
/health/ready
/health/start
/health/started
/health
| 200
| Yes
Expand All @@ -273,7 +273,7 @@ The following table gives valid health check responses for all kinds of health c

| /health/live
/health/ready
/health/start
/health/started
/health
| 503
| Yes
Expand All @@ -282,7 +282,7 @@ The following table gives valid health check responses for all kinds of health c

| /health/live
/health/ready
/health/start
/health/started
/health
| 503
| Yes
Expand All @@ -291,7 +291,7 @@ The following table gives valid health check responses for all kinds of health c

| /health/live
/health/ready
/health/start
/health/started
/health
| 500
| No
Expand Down
1 change: 1 addition & 0 deletions spec/src/main/asciidoc/release_notes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ A full list of changes may be found on the link:https://github.com/eclipse/micro
=== API/SPI Changes

- Added `@Startup` qualifier for the Kubernetes startup probes health check procedures (https://github.com/eclipse/microprofile-health/issues/274[#274])
- Introduction of `/health/started` endpoint that must call all the startup procedures

=== Functional Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* Verifies the liveness, readiness, and startup health integration with CDI when the Health Check procedures are
* defined with CDI method Producers.
*
*
* @author Prashanth Gunapalasingam
*/
public class CDIProducedProceduresTest extends TCKBase {
Expand Down Expand Up @@ -99,7 +99,7 @@ public void testFailureReadinessResponsePayload() {
@Test
@RunAsClient
public void testSuccessStartupResponsePayload() {
Response response = getUrlStartContents();
Response response = getUrlStartedContents();

// status code
Assert.assertEquals(response.getStatus(), 200);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static Archive getDeployment() {
@Test
@RunAsClient
public void testFailingStartupResponsePayload() {
Response response = getUrlStartContents();
Response response = getUrlStartedContents();

// status code
Assert.assertEquals(response.getStatus(), 503);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static Archive getDeployment() {
@Test
@RunAsClient
public void testFailedResponsePayload() {
Response response = getUrlStartContents();
Response response = getUrlStartedContents();

// status code
Assert.assertEquals(response.getStatus(), 503);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static Archive getDeployment() {
@Test
@RunAsClient
public void testSuccessResponsePayload() {
Response response = getUrlStartContents();
Response response = getUrlStartedContents();

// status code
Assert.assertEquals(response.getStatus(), 200);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Response getUrlReadyContents() {
return getUrlContents(this.uri + "/health/ready", false);
}

Response getUrlStartContents() {
return getUrlContents(this.uri + "/health/start", false);
Response getUrlStartedContents() {
return getUrlContents(this.uri + "/health/started", false);
}

private Response getUrlContents(String theUrl, boolean useAuth) {
Expand Down

0 comments on commit eba7a4c

Please sign in to comment.