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

Storage bucket: Surface non-retryable object delete error #6044

Conversation

modular-magician
Copy link
Collaborator

Release Note Template for Downstream PRs (will be copied)

storage: fixed bug where deleting a `google_storage_bucket` that contained non-deletable objects would retry indefinitely 

This PR fixes a bug when Storage Bucket delete operation is stuck in a never-ending loop when it can't delete objects - fixes #6034.

Please see the above-mentioned ticket on how to reproduce the issue.

With this PR in place, the terraform will give up when hitting a non-retryable error during objects delete (we will still try to delete the bucket in case we can):

google_storage_bucket.static-site: Destroying... [id=stepan-playground-tfdelete]

Error: could not delete non-empty bucket due to error when deleting contents: googleapi: Error 403: Object 'stepan-playground-tfdelete/test.txt' is under active Temporary hold and cannot be deleted, overwritten or archived until hold is removed., forbidden

I tried to add a test to cover this issue, but didn't find a way how to test Error on destroy with current Test() plumbing. If this is desirable I would appreciate help on how to best implement the test.

Derived from GoogleCloudPlatform/magic-modules#3336

…3336)

* Storage bucket: Surface non-retryable object delete error

* storage: test deleting bucket with non-deletable objects error

Signed-off-by: Modular Magician <[email protected]>
@ghost ghost added the size/m label Apr 3, 2020
@modular-magician modular-magician merged commit dc89f7c into hashicorp:master Apr 3, 2020
@ghost
Copy link

ghost commented May 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators May 4, 2020
@modular-magician modular-magician deleted the downstream-pr-5e208eaecc69409400f848df6c131b8023728992 branch November 16, 2024 23:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCS Bucket - delete operation stuck in never-ending loop when it can't delete objects
1 participant