-
Notifications
You must be signed in to change notification settings - Fork 119
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
Return the operation string in the response body for operations in progress #299
Conversation
Codecov Report
@@ Coverage Diff @@
## master #299 +/- ##
============================================
- Coverage 91.41% 91.28% -0.14%
+ Complexity 1187 1186 -1
============================================
Files 145 146 +1
Lines 2890 2904 +14
Branches 294 294
============================================
+ Hits 2642 2651 +9
- Misses 187 192 +5
Partials 61 61 Continue to review full report at Codecov.
|
@gberche-orange your review is appreciated as well. thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @royclarkson for handling this issue!
Besides the 3 comments in this review, and slightly unrelated, I wonder what SC-OSB users should use in case of a successful async response with an operation field (still returning a 202 accepted, but not as a result of a concurrent on going call).
It might make sense to add a createServiceInstanceWithAsyncOperationAndHeadersSucceeds
test case with
return Mono.just(CreateServiceInstanceResponse.builder()
.dashboardUrl(dashboard)
.operation(operation)
.async(true)
.instanceExisted(false)
.build());
...framework/cloud/servicebroker/exception/ServiceBrokerCreateOperationInProgressException.java
Outdated
Show resolved
Hide resolved
...ain/java/org/springframework/cloud/servicebroker/model/error/OperationInProgressMessage.java
Show resolved
Hide resolved
...contract-tests/src/test/resources/contracts/binding/reactive/async_in_progress_response.json
Outdated
Show resolved
Hide resolved
Thanks @gberche-orange. If the |
Yes, such a new test would be helpful as an example. |
This commit updates the ServiceBrokerExceptionHandler to marshal an OperationInProgressMessage response body instead of an ErrorMessage when handling any of the following scenarios and exceptions: Service instance provisioning ServiceBrokerCreateOperationInProgressException Service instance updating ServiceBrokerUpdateOperationInProgressException Service instance deleting ServiceBrokerDeleteOperationInProgressException Service instance binding ServiceBrokerCreateOperationInProgressException Service instance unbinding ServiceBrokerDeleteOperationInProgressException See /~https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#response-3 Resolves #284
e3c6bfe
to
35f05cc
Compare
@gberche-orange I added the requested test here. Thanks for the recommendation. 50a31c9 |
This commit updates the ServiceBrokerExceptionHandler to marshal an
OperationInProgressMessage response body instead of an ErrorMessage when
handling any of the following scenarios and exceptions:
Service instance provisioning ServiceBrokerCreateOperationInProgressException
Service instance updating ServiceBrokerUpdateOperationInProgressException
Service instance deleting ServiceBrokerDeleteOperationInProgressException
Service instance binding ServiceBrokerCreateOperationInProgressException
Service instance unbinding ServiceBrokerDeleteOperationInProgressException
See /~https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#response-3
Resolves #284