Skip to content

feat: enable/disable snapshots on an existing bucket#111

Merged
designcode merged 1 commit into
mainfrom
feat/set-bucket-type
Jun 22, 2026
Merged

feat: enable/disable snapshots on an existing bucket#111
designcode merged 1 commit into
mainfrom
feat/set-bucket-type

Conversation

@designcode

@designcode designcode commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds two commands to switch a bucket's type after creation, symmetric with the existing --enable-snapshots create flag:

  • tigris buckets enable-snapshots <bucket> — converts a regular bucket to a snapshot bucket (SDK enableSnapshot).
  • tigris buckets disable-snapshots <bucket> — converts it back to a regular bucket (SDK disableSnapshot). 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 --json output and live alongside the other buckets subcommands.

Backed by tigrisdata/storage#161; bumps @tigrisdata/storage ^3.14.0 → ^3.15.0.

Changes

  • src/specs.yaml — new enable-snapshots / disable-snapshots subcommands under buckets.
  • src/lib/buckets/enable-snapshots.ts, disable-snapshots.ts — handlers mirroring the existing set-* pattern.
  • README.md — regenerated from specs.
  • package.json / package-lock.json — SDK bump.

Tests

Integration tests in test/cli.test.ts:

  • enable-snapshots on a regular bucket, plus --json output assertion.
  • disable-snapshots on a snapshot bucket with no forks.
  • disable-snapshots rejected while the bucket has a dependent fork (the guard).

These are credential-gated (describe.skipIf) and run the built dist/ via npm run test:integration. Unit suite (684) and specs-completeness (279) pass; tsc, eslint, and prettier --check are clean.

🤖 Generated with Claude Code

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>
@designcode designcode merged commit cce47fb into main Jun 22, 2026
3 checks passed
@designcode designcode deleted the feat/set-bucket-type branch June 22, 2026 14:39
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants