kubernetes-retired / go-open-service-broker-client

A golang client for service brokers implementing the Open Service Broker API
Apache License 2.0
61 stars 51 forks source link

cannot differentiate http.StatusOK from http.StatusGone(410) in DeprovisionInstance #124

Closed maplain closed 4 years ago

maplain commented 6 years ago

I'm currently using this library to build a component that's talking to on demand service broker.

In current DeprovisionInstance implementation, we cannot really differentiate http.StatusOK from http.StatusGone: in either case, an empty response and a nil error are returned.

However, we do need this ability to take different actions. Besides, http.StatusGone has a 410 code which is supposed to mean ClientError. So I propose to return an empty response here and a non-nil error(returning a c.handleFailureResponse(response) should be good enough).

What do you think? If you feel ok, I'm happy to make a PR for this.

@pmorie cc @frodenas

maplain commented 6 years ago

here is the PR

maplain commented 6 years ago

@pmorie Could you please take a look? I'd really appreciate it if we can get some feedbacks here.

maplain commented 6 years ago

@pmorie ping again..

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 4 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 4 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

k8s-ci-robot commented 4 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/go-open-service-broker-client/issues/124#issuecomment-550025652): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Send feedback to sig-testing, kubernetes/test-infra and/or [fejta](https://github.com/fejta). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.