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

Deletion fails in case of subscriptions #68

Open
erik-am opened this issue Oct 7, 2021 · 1 comment
Open

Deletion fails in case of subscriptions #68

erik-am opened this issue Oct 7, 2021 · 1 comment
Labels
help wanted Extra attention is needed type: enhancement New feature or request

Comments

@erik-am
Copy link
Collaborator

erik-am commented Oct 7, 2021

When running sls remove, the removal of the WSO2 API fails if an application is subscribed to it.

Example log output:

{
  response: {
    code: 409,
    message: 'Conflict',
    description: 'Cannot remove the API 7c39e8a5-4481-4b68-b9d5-4b6adaa89797 as active subscriptions exist',
    moreInfo: '',
    error: []
  },
  responseCode: 409,
  responseHeaders: {
    'content-type': 'application/json',
    date: 'Tue, 05 Oct 2021 14:56:18 GMT',
    server: "[XXXXXXX]",
    'strict-transport-security': 'max-age=15768000',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'DENY',
    'x-xss-protection': '1; mode=block',
    'content-length': '163',
    connection: 'Close'
  }
}
Serverless: [serverless-wso2-apim] Deleting [stack name].. NOT OK, proceeding further.

The desired behaviour would be that the subscription is cleaned up as well and the WSO2 is deleted.

@ramgrandhi
Copy link
Owner

Thanks for reporting this, @erik-am

I can think of a solution as to retire the api explicitly before removing it.

one approach to implement it could be to use an explicit flag like ‘sls remove —force’ to deal with the above logic. What do you think?

@ramgrandhi ramgrandhi added type: enhancement New feature or request help wanted Extra attention is needed labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants