Repository navigation
feat(storage): purge soft-deleted buckets - #360
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Assisted-by: Claude Fable 5.1 via Claude Code
Contributor
|
MantasMiksys
approved these changes
Oct 8, 2026
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
Adds the destructive counterpart of
restoreBucket/tigris buckets restore: permanently destroying a soft-deleted bucket before its retention period expires.@tigrisdata/storage:purgeBucket(name, { config })→{ bucket, purged: true }. SendsDeleteBucketwithX-Tigris-Force-Hard-Delete: true(newTigrisHeaders.FORCE_HARD_DELETE), the gateway's hard-delete path for buckets in the soft-delete state; it refuses a live bucket (InvalidArgument: bucket is not in soft-delete state) rather than deleting it, and the gateway's message is passed through unwrapped.tigris buckets purge <name,...>(aliaspg): thebuckets deletebatch pattern — one confirmation naming every bucket ("… It/They can no longer be restored."), each purged in turn, failures reported per bucket without stopping the rest, non-zero exit if any failed;--yes/--forceskip the prompt;--format jsongives{ action: 'purged', names, errors }. Listed under Basics next torestore.Test plan
softDeleteblock: soft-delete → purge → gone from both the deleted and live listings; purging a live bucket returns the "soft-delete state" error and leaves it in placetsc, Biome, README regenerated🤖 Generated with Claude Code
Note
Medium Risk
Introduces irreversible bucket destruction, but the gateway should refuse live buckets and the CLI requires explicit confirmation unless --yes is used.
Overview
Adds the destructive counterpart to soft-deleted bucket restore: permanently remove buckets that are already in the soft-delete state before retention expires.
@tigrisdata/storageexposespurgeBucket, which issues S3DeleteBucketwith the newX-Tigris-Force-Hard-Deleteheader (TigrisHeaders.FORCE_HARD_DELETE). The gateway is expected to hard-delete only soft-deleted buckets and reject live ones.CLI adds
tigris buckets purge(aliaspg): supports one or more bucket names, interactive confirmation (or--yes/--force), per-bucket errors without stopping the batch, JSON output, and non-zero exit on any failure. Specs, README, and changesets are updated; storage integration and CLI unit tests cover success, rejection of non–soft-deleted buckets, and batch/partial-failure behavior.Reviewed by Cursor Bugbot for commit b1d9870. Bugbot is set up for automated code reviews on this repo. Configure here.