cloudfoundry / cloudfoundry/cf-java-client
UpdateProcessRequest cannot remove a timeout or invocationTimeout
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
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()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java, where the default ObjectMapper is configured with NON_NULL, then trace UpdateProcessRequest through processes().update. Reproduce the timeout-removal case from the issue and verify that an explicitly null timeout or invocationTimeout is preserved in the outgoing request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100