cloudfoundry / cloud_controller_ng

Cloud Foundry Cloud Controller
Apache License 2.0
191 stars 357 forks source link

CC does not refresh dashboard_url following completion of async service provisionning #1390

Closed gberche-orange closed 3 years ago

gberche-orange commented 5 years ago

Issue

CC does not support service brokers that provide an updated broker url upon completion of the async service instance provisioning.

Context

Some service brokers can't provide a dashboard URL in the synchronous service provisionning response, and rather return them in the GET /v2/service_instances/:instance_id endpoint. See related https://github.com/openservicebrokerapi/servicebroker/issues/498#issuecomment-411434165

Steps to Reproduce

Steps run on PWS:

git clone https://github.com/mattmcneeney/overview-broker.git
cf push -f examples/cloudfoundry/manifest.yaml --hostname overview-gberche
cf create-service-broker --space-scoped overview-broker admin password https://overview-gberche.cfapps.io
cf cs overview-service small overview-gberche

Check that catalog indeed specifies "instances_retrievable": true

curl -H "x-broker-api-version: 2.14" -u admin:password https://overview-gberche.cfapps.io/v2/catalog | jq

Use browser at https://overview-gberche.cfapps.io/dashboard to check calls made by CC to GET /v2/service_instances/:instance_id. None are made. CC isn't fetching any updated dashboard url

Expected result

CC should call the GET /v2/service_instances/:instance_id upon successful completion of async service instance provisioning (last operation endpoint), and update the dashboard url stored in CC db, and displayed in users in CLI querying GET /v2/spaces/3518c030-0b99-4075-834e-1b47e6ec7909/service_instances?q=name%3...

Current result

CC does not call the GET /v2/service_instances/:instance_id upon successful completion of async service instance provisioning

/CC @mattmcneeney

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/167230827

The labels on this github issue will be updated when the story is started.

addytripathi commented 5 years ago

Hello! We've decided to implement this in the v3 of the cloud controller API, and not fix this within v2. Reopen this issue if you have a comments?

gberche-orange commented 5 years ago

Hi @AartiKriplani

I've added this pain to the V3 Managed & User-Provided Service Instances Proposal

I notice the current V3 service instance endpoint documentation does not mention a dashboard url unlike V2 endpoint, and I guess should still be considered as experimental, even though it is not mentionned as such.

In which backlog service related service instance CC API V3 work can be tracked ?

gberche-orange commented 5 years ago

Re @addytripathi

Reopen this issue if you have a comments?

I wish this issue could remain open. Github does not allow non project members to reopen closed issues. I'd like to avoid submitting a duplicate issue to continue this conversation around inputs for V3 service endpoint.

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/169233921

The labels on this github issue will be updated when the story is started.

addytripathi commented 5 years ago

Hi @gberche-orange .. sorry about the delay in responding to you. I'll reopen this issue.

For reference, we're using this tracker for services API endpoints: https://www.pivotaltracker.com/n/projects/2105761

We're likely take up this work when we get to the service-instance resource.

gberche-orange commented 4 years ago

thanks @addytripathi I'll be watching the V3 service-instances label for related work.

FelisiaM commented 3 years ago

Hi @gberche-orange

Thanks for raising this and apologies for the time it took to get to it.

We have just implemented the feature to make sure that if the dashboard URL is provided in the service instance fetch endpoint we update it at the end of a create and update async operation. This should be available in the next CAPI release.

I will close the issue now. Let us know if you have any further feedback about this.

Thanks, Felisia

gberche-orange commented 3 years ago

Awesome, thanks @FelisiaM !

elenasharma commented 3 years ago

The fix for this issue was released in capi-release 1.106.0. Thank you for raising this issue!