Skip to content

UpdateProcessRequest cannot remove a timeout or invocationTimeout #1232

Open

Description

@LitschiW

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()

Activity

  1. LitschiW commented on Jun 21, 2024

    @LitschiW
    Author

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

  2. LitschiW commented on Jun 21, 2024

    @LitschiW
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions