openservicebrokerapi / servicebroker

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

Add clarity around concurrent updates #300

Closed duglin closed 7 years ago

duglin commented 7 years ago

From the f2f: Proposal: In the “Blocking Operations” section change it to say “...that mutate the same resource…” instead of “...that act on the same set of resources...”

&& creating Binding is not necessary considered mutating an Instance, it’s a Broker’s choice

&& move “Blocking Operations” out from under Async

&& change 422 in createBinding response status code table to include this concurrency stuff

Signed-off-by: Doug Davis dug@us.ibm.com

cfdreddbot commented 7 years ago

Hey duglin!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

angarg12 commented 7 years ago

LGTM

Approved with PullApprove

jmrodri commented 7 years ago

@duglin PR title has a TYPO: conurrent should be concurrent

duglin commented 7 years ago

@jmrodri fixed! thanks

avade commented 7 years ago

LGTM

Approved with PullApprove

mattmcneeney commented 7 years ago

LGTM

Approved with PullApprove

duglin commented 7 years ago

just one more review needed

jmrodri commented 7 years ago

Not sure I count but LGTM :)

duglin commented 7 years ago

Added text about orphan mitigation per the weekly meeting.

duglin commented 7 years ago

I changed the error code from 422 to "409 Conflict" - seemed more appropriate, but what do others think?

jmrodri commented 7 years ago

@duglin 409 Conflict does sound more appropriate. 👍

angarg12 commented 7 years ago

LGTM

Approved with PullApprove

duglin commented 7 years ago

reviews needed

duglin commented 7 years ago

updated and ready for reviews

mattmcneeney commented 7 years ago

LGTM

Approved with PullApprove

angarg12 commented 7 years ago

LGTM

Approved with PullApprove

duglin commented 7 years ago

ready for next round of reviews

mattmcneeney commented 7 years ago

LGTM

Approved with PullApprove

fmui commented 7 years ago

The proposal defines a fixed error body. A broker can neither change the description nor add additional data that might be useful to identify why there is a conflict. Can we make this a bit more flexible?

duglin commented 7 years ago

@fmui See: https://github.com/duglin/servicebroker/blob/6cbba3d423f3d7e5ebadd2e650f245ce531e1e2f/spec.md#broker-errors it says: "For error responses, the following fields are valid. Others will be ignored. ". While it would be nice if it was a bit clearer, I view that as saying the broker may include other fields (extensions) but they might be ignored by the platform. Does that cover it?

fmui commented 7 years ago

Not really. The proposal says: "...then the broker MUST reject the request with an HTTP 409 Conflict and the following body: ..."

This is much more restrictive than defined in the Broker Error section. It doesn't even allow to return a different description text. I don't see a reason why this error should have stricter rules than other errors.

duglin commented 7 years ago

I don't think it was meant to be more restrictive. I think an generic "error PR" to make us more consistent would be good to answer these concerns. In particular:

and we should touch all error text to ensure consistency.

vaikas commented 7 years ago

+1 to allowing for additional fields. We have already run into some issues because brokers are built on platforms that provide some fixed fields for all error responses.

duglin commented 7 years ago

@fmui can we clarify all of this in a follow-on PR? I'd prefer to keep this one more focused on just this one usecase.

zrob commented 7 years ago

I have a few concerns here.

  1. changing the MUST from 422 to 409 is a backwards incompatible change
  2. similar to fmui concern, this feels like a very restrictive error message, where brokers may want to include more or different details that could be helpful in resolving the issue
  3. I don't understand the benefits of making this change. I can see that 409 may be somewhat more correct, but do we have platforms that will perform a different behavior based on this? As long as we are returning an error and a useful message I don't see a reason to be more prescriptive than we already are.
duglin commented 7 years ago

I reverted back to 422 and decided to add the "extensibility" text into this PR instead of creating a new one. See what people think.

mattmcneeney commented 7 years ago

@duglin merge conflict!

duglin commented 7 years ago

rebased

mattmcneeney commented 7 years ago

This is going to give me merge conflict fun times in the async bindings PR. But LGTM anyway!

Approved with PullApprove

angarg12 commented 7 years ago

LGTM

Approved with PullApprove

fmui commented 7 years ago

LGTM

Approved with PullApprove

avade commented 7 years ago

lgtm

Approved with PullApprove