openservicebrokerapi / servicebroker

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

Why should the broker try to recover in the 5xx case? #611

Closed duglin closed 5 years ago

duglin commented 6 years ago

Right now the spec says:


Unless otherwise specified, an HTTP status code in the 4xx range MUST result in the Service Broker's resources being semantically unchanged as a result of the incoming request message. Additionally, an HTTP status code in the 5xx range SHOULD result in the Service Broker's resources being semantically unchanged as a result of the incoming request message. Note, the 5xx error case is a "SHOULD" instead of a "MUST" because it might not be possible for a Service Broker to guarantee that it can revert all possible effects of a failed attempt at the requested operation.


Which I think it 100% correct, in theory. However we then also have text (like the orphan mitigation section, and the async response section) which clearly states that in the event of a 5xx being sent back the Platform needs to assume the worst and delete the resource in question. This makes the "SHOULD in an HTTP status code in the 5xx range SHOULD result in the Service Broker's resources being semantically unchanged pretty pointless, since we're just going to delete it anyway.

I'm now wondering if we should just delete the "5xx... SHOULD..." sentences in the paragraph I quotes above, to avoid confusion.
What do people think?

mattmcneeney commented 6 years ago

Some other thoughts:

mattmcneeney commented 5 years ago

I believe the new Orphan Mitigation table helps clarify all of the above, so I'm going to close this issue!