cf-java-client
cf-java-client copied to clipboard
UpdateProcessRequest cannot remove a timeout or invocationTimeout
We are on version 5.12.1-RELEASE.
The default ObjectMapper is configured with setSerializationInclusion(NON_NULL)
.
When removing a timeout the request should set it explicitly to null
, which is not possible using this configuration. Hence an UpdateProcessRequest can, by default, never remove a timeout.
See the following screenshot for a debugging example result
The code above is called by invoking the following Mono:
Mono.just("<app-id>")
.flatMap(appId -> operator
.getCloudFoundryClient()
.applicationsV3()
.getProcess(GetApplicationProcessRequest.builder().applicationId(appId).type("web").build())
.flatMap(process -> {
return operator
.getCloudFoundryClient()
.processes().update(
UpdateProcessRequest.builder()
.processId(process.getId())
.healthCheck(HealthCheck.builder()
.type(HealthCheckType.from(targetState.manifest().getHealthCheckType().toString()))
.data(Data.builder()
.endpoint(targetState.manifest().getHealthCheckHttpEndpoint())
.timeout(targetState.manifest().getTimeout())
.build())
.build())
.build()
).doOnSuccess(updateProcessResponse -> {
log.info("Updated health check for application");
});
}).then()