Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateProcessRequest cannot remove a timeout or invocationTimeout #1232

Open
LitschiW opened this issue Jun 21, 2024 · 2 comments
Open

UpdateProcessRequest cannot remove a timeout or invocationTimeout #1232

LitschiW opened this issue Jun 21, 2024 · 2 comments

Comments

@LitschiW
Copy link

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

grafik

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()
@LitschiW
Copy link
Author

I think this may also apply to the PushApplicationManifestRequest since it also cannot remove a timeout.

@LitschiW
Copy link
Author

As a workaround we now use the cf api directly, using the default ObjectMapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant