feat(s3-backup-settings): add backup rotation to automatically delete old S3 backups#25
Open
Ahuahuachi wants to merge 8 commits into
Open
feat(s3-backup-settings): add backup rotation to automatically delete old S3 backups#25Ahuahuachi wants to merge 8 commits into
Ahuahuachi wants to merge 8 commits into
Conversation
Confidence Score: 5/5The rotation logic is sound and the previously identified gaps are addressed; safe to merge. Path-prefix stripping, 1000-key delete batching, and error-logging are all correctly implemented. No remaining defects in the changed code paths. No files require special attention. Reviews (6): Last reviewed commit: "fix(s3-backup-settings): log rotation de..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a backup rotation feature to S3 Backup Settings that automatically deletes old backup folders from the S3 bucket after each successful upload, preventing unbounded storage growth.
Type of Change
Changes
enable_backup_rotationandretention_countfields to the S3 Backup Settings DocType, allowing users to configure how many backup folders to keep.delete_old_backups_from_s3()to list all backup folders in the S3 bucket, sort them by date (parsed from the YYYYMMDD_HHMMSS folder name), and delete the oldest folders that exceed the retention count.delete_s3_folder()helper to remove all objects within a given S3 folder prefix using paginated listing and batchdelete_objects.delete_old_backups_from_s3()after eachsuccessful backup_to_s3().retention_countis at least 1 when rotation is enabled.Breaking Changes
None.
Related Issues
closes #19
Testing