cloudfoundry / cloudfoundry/cf-java-client
UpdateProcessRequest cannot remove a timeout or invocationTimeout
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 334
- 派生
- 319
- PR 合并指标
- 30 天内没有已合并 PR
描述
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()
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java 开始,该文件中默认的 ObjectMapper 配置为 NON_NULL,然后跟踪 UpdateProcessRequest 经过 processes().update 的流程。复现 issue 中移除 timeout 的情况,并验证显式设置为 null 的 timeout 或 invocationTimeout 会保留在传出的请求中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100