Skip to content

ReactorCloudFoundryClient fails on receiving an incomplete DeleteServiceInstanceResponse #686

@mtthwcmpbll

Description

@mtthwcmpbll

I've run into some issues when trying to delete service instances created by the AWS service broker, which requires accepts_incomplete=true due to how long it can take to create or delete a particular service instance. Making a request through the ReactorCloudFoundryClient to delete an existing service instance using the following code fails:

cloudFoundryClient.serviceInstances() .delete(org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest.builder() .serviceInstanceId(serviceInstance.getId()) .acceptsIncomplete(true) .async(true) .build()) .block();

This throws an exception when it tries to deserialize the JSON response into a DeleteServiceInstanceResponse object as an incomplete response does not include an id or status field according to the CC API docs, but these are not marked as @Nullable in the entity class. The example response in the CC API documentation doesn't show these fields either.

I've tested this call on a few other services such as the PWS MongoDB and PostgreSQL services and these don't seem to have the same problem, but there's no way to guarantee that these are sending back an incomplete response. Additionally, the CloudFoundryOperation's call to create a service instance ultimately does set acceptsIncomplete(true) on the CreateServiceInstanceRequest and this handles the incomplete response successfully as all fields in the CreateServiceInstanceResponse are marked as @Nullable.

CF API version: 2.58.0 (v239)
Reactor Framework version: 2.4.0.BUILD-SNAPSHOT

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions