Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-306

Health check response contains default readiness data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • MP Health
    • None
    • Hide
      • download and extract Wildfly 19 Beta 1 binaries into something like ~/wfly-19-beta-1
        ...
      • clone and build from sources the current feature branch [1] into something like ~/wfly-health-22 (by copying there the "dist" directory resulting from the build)
        $ git clone git@github.com:jmesnil/wildfly.git
        $ cd wildfly 
        $ git checkout WFLY-13048_upgrade_microprofile-health_2.2
        $ mvn clean install 
        ...
        $ mv dist/target/wildfly-20.0.0.Beta1-SNAPSHOT ~/wfly-health-22
        
      • clone the reproducer repository [2] and run the tests
        $ git clone git@github.com:fabiobrz/health-22-repro.git
        
        $ cd health-22-repro
        # run the tests against WF 19 Beta 1: everything should be ok
        $ mvn clean test -Djboss.home=~/wfly-19-beta-1 -Dtest=MissingReadinessHealthTest
        
        # run the tests against WF feature branch: 2 tests should fail
        $ mvn clean test -Djboss.home=~/wfly-health-22 -Dtest=MissingReadinessHealthTest
        

      [1]
      https://github.com/jmesnil/wildfly

      [2]
      https://github.com/fabiobrz/health-22-repro

      Show
      download and extract Wildfly 19 Beta 1 binaries into something like ~/wfly-19-beta-1 ... clone and build from sources the current feature branch [1] into something like ~/wfly-health-22 (by copying there the "dist" directory resulting from the build) $ git clone git@github.com:jmesnil/wildfly.git $ cd wildfly $ git checkout WFLY-13048_upgrade_microprofile-health_2.2 $ mvn clean install ... $ mv dist/target/wildfly-20.0.0.Beta1-SNAPSHOT ~/wfly-health-22 clone the reproducer repository [2] and run the tests $ git clone git@github.com:fabiobrz/health-22-repro.git $ cd health-22-repro # run the tests against WF 19 Beta 1: everything should be ok $ mvn clean test -Djboss.home=~/wfly-19-beta-1 -Dtest=MissingReadinessHealthTest # run the tests against WF feature branch: 2 tests should fail $ mvn clean test -Djboss.home=~/wfly-health-22 -Dtest=MissingReadinessHealthTest [1] https://github.com/jmesnil/wildfly [2] https://github.com/fabiobrz/health-22-repro

    Description

      Starting from Wildfly 19 Beta 2 and with current feature branch for MP Health upgrade to 2.2 [1], some tests started to fail, reporting unexpected content in JSON response.

      When no readiness health check procedures are defined for a given deployment - the returned JSON payload contains a "default" health check readiness object, conventionally named as "ready-deployment." + <archive-name>

      The same does not happen when there's just one registered readiness procedure - i.e. when no annotated liveness procedures exist.

      This change is not documented in the Analysis document: https://github.com/wildfly/wildfly-proposals/pull/284

      The following example uses an Arquillian deployment with a single HealthCheck implementation with liveness health check procedure.

      1. feature branch [1]

      //health
      {
          "status": "UP",
          "checks": [
              {
                  "name": "live",
                  "status": "UP",
                  "data": {
                      "key": "value"
                  }
              },
              {
                  "name": "ready-deployment.HealthTest.war",
                  "status": "UP"
              }
          ]
      }
      
      //live
      {
          "status": "UP",
          "checks": [
              {
                  "name": "live",
                  "status": "UP",
                  "data": {
                      "key": "value"
                  }
              }
          ]
      }
      
      //ready
      {
          "status": "UP",
          "checks": [
              {
                  "name": "ready-deployment.HealthTest.war",
                  "status": "UP"
              }
          ]
      }
      

      2. here are the results for the same calls against Wildfly 19 Beta 1:

      //health
      {
          "status": "UP",
          "checks": [
              {
                  "name": "live",
                  "status": "UP",
                  "data": {
                      "key": "value"
                  }
              }
          ]
      }
      
      //live
      {
          "status": "UP",
          "checks": [
              {
                  "name": "live",
                  "status": "UP",
                  "data": {
                      "key": "value"
                  }
              }
          ]
      }
      
      //ready
      {
          "status": "UP",
          "checks": []
      }
      
      

      [1]
      https://github.com/jmesnil/wildfly

      Attachments

        Activity

          People

            Unassigned Unassigned
            fburzigo Fabio Burzigotti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: