Skip to content

V3/Processes: HealthCheckType "none" not supported / JsonParsingException #909

@eaglerainbow

Description

@eaglerainbow

This is in reference to promregator/promregator#72 (comment) where a user of Promregator detected a situation which leads to a JsonParsingException when reading the data of endpoint /v3/processes from a CF platform with API version 2.94.0.

In a nutshell:

  • There is an app in state "RUNNING" with guid 978e4999-c62c-4dc5-98ea-1412983e92e6
  • This app has the health-check functionality switched off.
  • The call cf curl '/v3/processes?app_guids=978e4999-c62c-4dc5-98ea-1412983e92e6&organization_guids=8acf895e-ce26-42d7-819d-c3f4a3b251d5&page=1&per_page=50&space_guids=ecfd1d01-e32b-41fb-a474-1fb63dd813e8' returns the following document (copy & paste from promregator#72):
    {
       "pagination": {
          "total_results": 1,
          "total_pages": 1,
          "first": {
          "href": "https://api.sys.our.cloud.com/v3/processes?app_guids=978e4999-c62c-4dc5-98ea-1412983e92e6&organization_guids=8acf895e-ce26-42d7-819d-c3f4a3b251d5&page=1&per_page=50&space_guids=ecfd1d01-e32b-41fb-a474-1fb63dd813e8"
          },
          "last": {
             "href": "https://api.sys.our.cloud.com/v3/processes?app_guids=978e4999-c62c-4dc5-98ea-1412983e92e6&organization_guids=8acf895e-ce26-42d7-819d-c3f4a3b251d5&page=1&per_page=50&space_guids=ecfd1d01-e32b-41fb-a474-1fb63dd813e8"
          },
          "next": null,
          "previous": null
       },
       "resources": [
          {
             "guid": "978e4999-c62c-4dc5-98ea-1412983e92e6",
             "type": "web",
             "command": "[PRIVATE DATA HIDDEN IN LISTS]",
             "instances": 1,
             "memory_in_mb": 1024,
             "disk_in_mb": 1024,
             "health_check": {
                "type": "none",
                "data": {
                   "timeout": null
                }
             },
             "created_at": "2018-05-09T13:13:29Z",
             "updated_at": "2018-08-31T05:47:26Z",
             "links": {
                "self": {
                   "href": "https://api.sys.our.cloud.com/v3/processes/978e4999-c62c-4dc5-98ea-1412983e92e6"
                },
                "scale": {
                   "href": "https://api.sys.our.cloud.com/v3/processes/978e4999-c62c-4dc5-98ea-1412983e92e6/actions/scale",
                   "method": "POST"
                },
                "app": {
                   "href": "https://api.sys.our.cloud.com/v3/apps/978e4999-c62c-4dc5-98ea-1412983e92e6"
                },
                "space": {
                   "href": "https://api.sys.our.cloud.com/v3/spaces/ecfd1d01-e32b-41fb-a474-1fb63dd813e8"
                },
                "stats": {
                   "href": "https://api.sys.our.cloud.com/v3/processes/978e4999-c62c-4dc5-98ea-1412983e92e6/stats"
                }
             }
          }
       ]
    }
    Mind here that resources[0].health_check.type == "none"
  • Promregator is triggering the same call with the following pieces of source code: https://github.com/promregator/promregator/blob/ec2aaa0ff74716011de6ea17fb2ac803841d04c9/src/main/java/org/cloudfoundry/promregator/cfaccessor/ReactiveCFAccessorImpl.java#L381 and https://github.com/promregator/promregator/blob/ec2aaa0ff74716011de6ea17fb2ac803841d04c9/src/main/java/org/cloudfoundry/promregator/cfaccessor/ReactiveCFAccessorImpl.java#L232
  • This combination causes an exception org.cloudfoundry.reactor.util.JsonParsingException: Cannot construct instance of org.cloudfoundry.client.v3.processes.HealthCheckType, problem: Unknown health check type: none
  • Current version of cf-java-client in use by Promregator is 3.11.0.RELEASE.
  • Current source code version of is identical to the version being used. The enum is missing "none".

For further details, please feel free to also have a look at promregator/promregator#72

@jensbaitingerbosch Ping to you, that I have created this issue for your case.

Thanks for looking at this case!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions