Skip to content
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

Ambiguity in docs regarding response for polling last operation on deprovision #706

Open
rossheninger opened this issue Mar 23, 2020 · 2 comments

Comments

@rossheninger
Copy link

rossheninger commented Mar 23, 2020

What is the problem?
The documentation is slightly unclear to someone unfamiliar with what the response should be from the polling last operation API after a deprovision request returns a 202. Myself and two other developers on my team had a debate as to whether or not we are supposed to return a 410 after a successful deprovision or a 200 with "state":"succeeded". It seemed like both options made sense but responses in the 400's make it seem like there is some sort of error.

After speaking with another developer who was more familiar, he told us that we should return 200's with "state":"in progress" until it finishes then return the 410. I think something should be changed in the docs to clearly state that you should never return a 200 with "state":"succeeded" for a deprovision. Currently it says 410's should be interpreted as a success on deprovision but it doesn't explicitly say not to use 200 w/ "state":"succeeded" which imo left it ambiguous.

Who does this affect?
Service broker developers/platform authors.

Do you have any proposed solutions?
Explicitly say not to return 200 w/ "state":"succeeded" in the response for deprovisions in the last operation API.

Additional context
Add any other context or screenshots can go here.

@rossheninger
Copy link
Author

https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#polling-last-operation-for-service-instances

LMK if my understanding here is accurate and I should never return a 200 w/ "state":"succeeded" for a deprovision

@mattmcneeney
Copy link
Contributor

I think you're right that this is a little ambiguous. Our expectation is that either approach is fine - a broker could return a HTTP 200 with succeded, or a 410 if it had immediately forgotten about the operation (potentially useful if a broker wanted to keep as little state as possible).

We can probably clarify this with a small text change, but can't say only one approach is now valid as that would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

No branches or pull requests

3 participants