cloudfoundry / cloudfoundry/cloud_controller_ng
`/v3/app` delete does not wait until service binding are unbound
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
Issue
User tries to call DELETE v3/app/<guid> for an app with a service binding where the service broker does not reply synchronously.
This can result in a failed v3 app deletion job although the service binding is deleted eventually.
App delete job:
{
"guid":"<guid>",
"created_at":"2023-06-28T18:46:13Z",
"updated_at":"2023-06-28T18:46:16Z",
"operation":"app.delete",
"state":"FAILED",
"errors":[
{
"detail":"An operation for the service binding between app myapp and service instance slow-broker-service is in progress.",
"title":"CF-UnprocessableEntity",
"code":10008
}
],
"warnings":[
],
"links":{
"self":{
"href":"https://api.cf.bommel/v3/jobs/<guid>"
},
"app":{
"href":"https://api.cf.bommel/v3/apps/<guid>"
}
}
}
Context
The binding deletion is implemented here:
https://github.com/cloudfoundry/cloud_controller_ng/blob/main/app/actions/mixins/bindings_delete.rb#L19-L24
Which is called during app delete:
https://github.com/cloudfoundry/cloud_controller_ng/blob/main/app/actions/app_delete.rb#L101-L104
Possible Expected Results
- Current behavior
- App deletion job should wait
- App deletion job should NOT wait for binding deletion BUT not fail
-> Needs to be discussed
Current result
App deletion job fails although the binding is deleted eventually
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading app/actions/mixins/bindings_delete.rb and app/actions/app_delete.rb at the referenced call sites to trace how asynchronous service-binding deletion affects the app deletion job. Resolve whether deletion should wait for unbinding or avoid failing while it is in progress, then verify that the chosen behavior no longer produces the reported failed job.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100