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

As a Korifi user, I want service instances not to be deleted when unprovisioning fails for whatever reason #3586

Open
danail-branekov opened this issue Nov 1, 2024 · 0 comments
Labels

Comments

@danail-branekov
Copy link
Member

danail-branekov commented Nov 1, 2024

Background

When implementing managed service unprovision we decided that we would ignore errors (note, this method does not return error intentionally) when finalizing. The motivation was that we should perform a best-effort to delete resources and get the instance deleted as quickly as possible.

However, according to the osbapi spec,

and SHOULD keep trying to delete them until the Service Broker responds with a success

Acceptance

GIVEN I have created a managed service instance
WHEN I try to delete the instance
WHEN the broker returns an error response to the unprovision request
THEN the instance is not deleted
AND THEN I see the broker receives new unprovision requests for that instance

GIVEN I have created a managed service instance
WHEN the broker is not there (someone has deleted it)
WHEN I try to delete the instance
THEN the instance is not deleted

GIVEN I have created a managed service instance
WHEN the service offering is not available (someone deleted it for some reason)
WHEN I try to delete the instance
THEN the instance is not deleted

GIVEN I have created a managed service instance
WHEN the service plan is not available (someone deleted it for some reason)
WHEN I try to delete the instance
THEN the instance is not deleted

Dev notes

  • instance purging should address instances becoming not deletable
  • If an isntance is purged, how should that affect its bindings? Should we ignore the error when getting the instance during finalization? Should the binding become unready/failed if its instance is gone?
  • While being here, make use of the utility to get service instance context in the controller:
    func (r *Assets) GetServiceInstanceAssets(ctx context.Context, serviceInstance *korifiv1alpha1.CFServiceInstance) (ServiceInstanceAssets, error) {
@danail-branekov danail-branekov converted this from a draft issue Nov 1, 2024
@danail-branekov danail-branekov changed the title As a Korifi user, I want service instances not to be deleted when unbinding fails for whatever reason As a Korifi user, I want service instances not to be deleted when unprovisioning fails for whatever reason Nov 4, 2024
@danail-branekov danail-branekov moved this from 🇪🇺 To do to 🔄 In progress in Korifi - Backlog Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🔄 In progress
Development

No branches or pull requests

1 participant