Skip to content

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Nov 5, 2025

The nuke_bucket cleanup function was failing to delete buckets that had ongoing multipart uploads because it only deleted objects but didn't abort the uploads. This caused test teardown to fail with BucketNotEmpty errors when tests left multipart uploads incomplete.

Add logic to list and abort all multipart uploads in a bucket before attempting to delete it. This ensures clean test teardown even when tests fail or don't complete their uploads.

This change is necessary for S3 implementations that correctly enforce the requirement that buckets with ongoing multipart uploads cannot be deleted, while still supporting deferred cleanup of part data (where AbortMultipartUpload removes metadata immediately but storage cleanup happens asynchronously).

The nuke_bucket cleanup function was failing to delete buckets that had
ongoing multipart uploads because it only deleted objects but didn't
abort the uploads. This caused test teardown to fail with BucketNotEmpty
errors when tests left multipart uploads incomplete.

Add logic to list and abort all multipart uploads in a bucket before
attempting to delete it. This ensures clean test teardown even when
tests fail or don't complete their uploads.

This change is necessary for S3 implementations that correctly enforce
the requirement that buckets with ongoing multipart uploads cannot be
deleted, while still supporting deferred cleanup of part data (where
AbortMultipartUpload removes metadata immediately but storage cleanup
happens asynchronously).

Signed-off-by: Kefu Chai <[email protected]>
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.

1 participant