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

/v3/app delete does not wait until service binding are unbound #3333

Open
johha opened this issue Jun 30, 2023 · 0 comments
Open

/v3/app delete does not wait until service binding are unbound #3333

johha opened this issue Jun 30, 2023 · 0 comments

Comments

@johha
Copy link
Contributor

johha commented Jun 30, 2023

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

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

No branches or pull requests

2 participants