feat: enable/disable snapshots on an existing bucket#111
Merged
Conversation
Add `buckets enable-snapshots` and `buckets disable-snapshots` to switch a bucket's type after creation, symmetric with the `--enable-snapshots` create flag. enable maps to the SDK's enableSnapshot; disable maps to disableSnapshot, which is rejected while the bucket has dependent forks. Bumps @tigrisdata/storage to ^3.15.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
garrensmith
approved these changes
Jun 22, 2026
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 two commands to switch a bucket's type after creation, symmetric with the existing
--enable-snapshotscreate flag:tigris buckets enable-snapshots <bucket>— converts a regular bucket to a snapshot bucket (SDKenableSnapshot).tigris buckets disable-snapshots <bucket>— converts it back to a regular bucket (SDKdisableSnapshot). Rejected while the bucket has dependent forks — a snapshot parent can't become regular while forks depend on it; the SDK's guard error is surfaced as-is.Both support
--jsonoutput and live alongside the otherbucketssubcommands.Backed by tigrisdata/storage#161; bumps
@tigrisdata/storage^3.14.0 → ^3.15.0.Changes
src/specs.yaml— newenable-snapshots/disable-snapshotssubcommands underbuckets.src/lib/buckets/enable-snapshots.ts,disable-snapshots.ts— handlers mirroring the existingset-*pattern.README.md— regenerated from specs.package.json/package-lock.json— SDK bump.Tests
Integration tests in
test/cli.test.ts:enable-snapshotson a regular bucket, plus--jsonoutput assertion.disable-snapshotson a snapshot bucket with no forks.disable-snapshotsrejected while the bucket has a dependent fork (the guard).These are credential-gated (
describe.skipIf) and run the builtdist/vianpm run test:integration. Unit suite (684) and specs-completeness (279) pass;tsc,eslint, andprettier --checkare clean.🤖 Generated with Claude Code