feat: default-tier updates and snapshot-scoped object restore - #204
Merged
Conversation
Greptile SummaryAdds support for updating a bucket's default storage tier and restoring or inspecting objects within a specified bucket snapshot.
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness or security failures identified in the changed paths. The new bucket field matches the existing REST response and settings shape, the shared middleware preserves the prior command-scoped header behavior, and CLI values and aliases are consistently propagated into the SDK. Important Files Changed
Reviews (1): Last reviewed commit: "feat(cli): support default-tier updates ..." | Re-trigger Greptile |
- updateBucket: add `defaultTier` to change an existing bucket's default storage class via the settings PATCH body - restoreObject / getRestoreInfo: add `snapshotVersion` to target a point-in-time bucket snapshot - refactor: extract the duplicated snapshot-version build middleware into a shared `addSnapshotVersionMiddleware` helper used by get/head/list/restore - test: add updateBucket default-tier round-trip and snapshot-restore integration coverage Assisted-by: Claude Opus 4.8 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…store - buckets set: add `--default-tier` to change an existing bucket's default storage tier - objects restore / restore-info: add `--snapshot-version` (alias `--snapshot`) to target a point-in-time bucket snapshot Assisted-by: Claude Opus 4.8 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
designcode
force-pushed
the
feat/default-tier-change
branch
from
July 23, 2026 19:53
2c43dfe to
5d48f51
Compare
tahakhan
approved these changes
Jul 23, 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 two capabilities across the storage SDK and CLI:
updateBucket({ defaultTier })in the SDK, surfaced as
tigris buckets set --default-tier <tier>.restoreObject/getRestoreInfoacceptsnapshotVersionto target a point-in-time bucket snapshot, surfaced astigris objects restore|restore-info --snapshot-version <version>(alias--snapshot).Also refactors the duplicated snapshot-version build middleware (previously
copy-pasted across get/head/list/restore) into a shared
addSnapshotVersionMiddlewarehelper.Changes
@tigrisdata/storage(a3b3222)updateBucket: newdefaultTieroption →storage_classin the settings PATCH bodyrestoreObject/getRestoreInfo: newsnapshotVersionoption →X-Tigris-Snapshot-VersionheaderaddSnapshotVersionMiddlewarehelper (get/head/list/restore)@tigrisdata/cli(2c43dfe)buckets set --default-tierobjects restore --snapshot-version/restore-info --snapshot-version(alias--snapshot)Testing
bucket-updatedefault-tier round-trip andsnapshot-scoped restore, verified against the live gateway; existing
restore/object-versions suites pass (16/16).
specs-completenesspasses (313/313); built-CLI--helpshows all threeflags;
tsc+ Biome clean.Notes
pnpm changesetentries forboth
@tigrisdata/storageand@tigrisdata/cli(minor) after review and amendthem into their respective commits.
🤖 Generated with Claude Code
Note
Medium Risk
Changes bucket default tier via PATCH (affects future uploads) and adds snapshot-scoped restore against live storage APIs; additive but touches core bucket/object behavior.
Overview
Adds default storage tier updates for existing buckets and snapshot-pinned archive restore across the storage SDK and CLI.
Bucket default tier:
updateBucketacceptsdefaultTier, sent asstorage_classon the bucket settings PATCH. The CLI exposes this astigris buckets set --default-tier(reusing existing tier options).Snapshot-scoped restore:
restoreObjectandgetRestoreInfoaccept optionalsnapshotVersion, which setsX-Tigris-Snapshot-Versionon the S3 request. CLI:tigris objects restoreandrestore-infoadd--snapshot-version(alias--snapshot).Refactor: Duplicated snapshot-header middleware in get/head/list/restore is consolidated into
addSnapshotVersionMiddleware; restore paths now use the same helper.Minor changesets for
@tigrisdata/storageand@tigrisdata/cli, plus integration tests for tier round-trips and snapshot restore flows.Reviewed by Cursor Bugbot for commit 5d48f51. Bugbot is set up for automated code reviews on this repo. Configure here.