openservicebrokerapi / servicebroker

Open Service Broker API Specification
https://openservicebrokerapi.org/
Apache License 2.0
1.19k stars 434 forks source link

Blocking Operations and 409 Error Codes. #408

Closed n3wscott closed 6 years ago

n3wscott commented 6 years ago

The Blocking Operations section of the spec says "MUST return 422" but creating a binding and getting a conflict has the error language as:

| 409 Conflict | MUST be returned if a Service Binding with the same id, for the same Service Instance, already exists but with different parameters. Additionally, if the Service Broker rejects the request due to a concurrent request to create a binding for the same Service Instance, then this error MUST be returned (see [Blocking Operations](#blocking-operations)). |

This, ironically, conflicts.

The spec needs to either remove the requirement for MUST 422 in the case of a ConcurrencyError, OR move the Blocking Operation text to the 422 for bindings. OR option 3?

mattmcneeney commented 6 years ago

I'd vote for using 422 for any blocking operation. I'm guessing we can remove this MUST (breaking change) since it is a conflict in the spec.

@avade what does ODB return today when it tries to create a binding on an instance that has an operation in progress?

Any other broker authors please let us know too!

duglin commented 6 years ago

+1 to a 422. PR: https://github.com/openservicebrokerapi/servicebroker/pull/413