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

Fix app deletion in case of asynchronous service bindings #547

Merged
merged 2 commits into from Jan 29, 2024

Conversation

LukasHeimann
Copy link
Contributor

Fixes #546

// error handling
if err != nil {
// https://github.com/cloudfoundry/cloud_controller_ng/issues/3589 -> Delete app when bound to service fails with async service brokers -> Retry that
specialError, _ := regexp.MatchString("An operation for the service binding between app .* and service instance .* is in progress.", err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, will the API return an error matching this regardless of the service broker implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Session: session,
JobURL: jobURL,
})
err = v3appdeployers.SafeAppDeletion(*session.ClientV3, appGUID, 5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small note: this would mean that we can potentially be waiting up to 5 minutes for each venerable app deletion. We'd probably want to discuss with @loafoe on whether this is too much time or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, you are right. I'm not sure what actually will take up time in the process. The assumption is that if deletion of services fails (due to asynchronicity), it does fail fast.

See the delete action at cloud controller:

As such, when the retry happens, it should happen fast and not after lots of iterations in the polling loop.

Copy link
Contributor

@sleungcy sleungcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@loafoe loafoe merged commit 31b9c3d into cloudfoundry-community:main Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App Deletion with Service Binding to Async Service Broker
4 participants