-
Notifications
You must be signed in to change notification settings - Fork 71
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
Using KeyPrefix does not delete the s3 bucket after "sls remove" command. #134
Comments
On one hand I think it makes sense not to remove the bucket when @thescientist23 if you're still interested in this functionality can you please explain why you're using I think if we want to support removing the bucket when |
@mikejpeters seconding what you're saying here. This could have unintended consequences that I'm not comfortable with. If we add support for this it should be in a new feature/setting. |
@mikejpeters , thanks for your response, I am using |
Thanks for the response. I'm assuming you wouldn't want this plugin to delete the bucket if there are still other objects i (e.g. in your case feature branches)? @fernando-mc can you weigh in on this again when you have a chance? If the plugin deletes the objects at the prefix, and then only deletes the bucket if it's completely empty I don't see a downside. But maybe I'm missing some danger / use case? Having a new option like "force remove bucket" is safer but IMO less user-friendly. I like having smart defaults / less options, even if it means releasing a new major version with breaking changes |
@mikejpeters - I also prefer clean sensible defaults so as long as we release this with a major version bump I'm fine with it. I agree it probably makes sense and there's aren't many people who would object to it but it does change default behavior destructively and there's always some weird use cases we can't predict. When including this:
Then we're covering our bases and should be fine. |
When running `client remove`, if a bucket only contains objects at the keyPrefix then also delete the bucket itself. BREAKING CHANGE: Bucket is deleted if empty on `client remove`. resolves #134
When running `client remove`, if a bucket only contains objects at the keyPrefix then also delete the bucket itself. BREAKING CHANGE: Bucket is deleted if empty on `client remove`. resolves #134
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This is a:
For bug reports:
Expected behavior
"sls remove" should remove the bucket
Actual behavior
objects was deleted but the bucket remains, although it is empty but in a long run it will pile up on my aws account.
Steps to reproduce
Added KeyPrefix to yml file.
Below is the result of "remove" command.
I think this block of code has something to do with the behavior.
serverless.yml
that produces bug:For feature requests or changes:
Current behavior (if any)
Proposed behavior
Proposed implementation deatils (optional)
Justification
The text was updated successfully, but these errors were encountered: