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

Delete S3 versions in rmdir #29165

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Conversation

PVince81
Copy link
Member

@PVince81 PVince81 commented Oct 11, 2021

When deleting a complete folder in a bucket that has versioning enabled,
also make sure to delete all associated versions and delete markers

Fixes nextcloud/files_versions_s3#11

Tests

  • TEST: with Minio versioned bucket
    • rename folder with 2 levels
    • rename empty folder
    • delete folder with 2 levels
    • delete empty folder
  • TEST: with Minio non-versioned bucket
    • rename folder with 2 levels
    • rename empty folder
    • delete folder with 2 levels
    • delete empty folder

Todos

When deleting a complete folder in a bucket that has versioning enabled,
also make sure to delete all associated versions and delete markers

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81 PVince81 self-assigned this Oct 11, 2021
@PVince81 PVince81 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 11, 2021
@PVince81 PVince81 marked this pull request as ready for review October 11, 2021 12:07
@PVince81 PVince81 merged commit 0f80bc0 into master Oct 11, 2021
@PVince81 PVince81 deleted the bug/noid/s3-delete-folder-versions branch October 11, 2021 14:32
@artonge
Copy link
Contributor

artonge commented Oct 11, 2021

It is weird that the AWS API does not have an option to delete versions when deleting a file

@PVince81
Copy link
Member Author

/backport to stable22

@PVince81
Copy link
Member Author

/backport to stable21

@PVince81
Copy link
Member Author

/backport to stable20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renaming a folder duplicates it
3 participants