Skip to content

feat(rc-versioning)!: add version-aware object operations - #296

Merged
cxymds merged 6 commits into
mainfrom
cxymds/issue-1368-versioning
Jul 22, 2026
Merged

feat(rc-versioning)!: add version-aware object operations#296
cxymds merged 6 commits into
mainfrom
cxymds/issue-1368-versioning

Conversation

@cxymds

@cxymds cxymds commented Jul 22, 2026

Copy link
Copy Markdown
Member

Related issue

Background and user impact

RustFS supports version-aware object reads, inspection, copy, listing, and deletion, but the CLI did not provide a consistent contract for selecting exact versions or preserving partial multi-version deletion results. Version-aware JSON also used legacy command-specific shapes, and authorization failures could be misclassified when status metadata was available.

Solution

  • Add exact-version support to cat, head, stat, cp, and rm.
  • Add recursive rm --versions, including pagination, delete markers, partial-success retention, and explicit governance bypass.
  • Keep RustFS force-delete semantics isolated to the existing purge workflow.
  • Add safe ObjectStore defaults and structured S3 error mapping for version-specific behavior.
  • Add output v3 versioned_objects records for stat, copy, removal, dry-run, and partial failure results.
  • Preserve all current main behavior, including transfer, mirror, watch, ops, replication, and purge workflows.

BREAKING change and migration

BREAKING: JSON produced by stat --version-id, rm --version-id, rm --versions, and cp when version identifiers are returned now uses the output schema v3 versioned_objects envelope. Unversioned command output remains unchanged, and output v1/v2 schemas are unchanged. Consumers should dispatch on schema_version, read results under data, and use data.planned for dry-run removals.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • Focused exact-version, versioned-delete, versioned-object, mirror planner, and mirror command tests
  • git diff --check and conflict-marker audit

All checks pass with zero failures.

@cxymds
cxymds requested a review from overtrue July 22, 2026 15:28
@cxymds
cxymds merged commit 0596afb into main Jul 22, 2026
17 checks passed
@cxymds
cxymds deleted the cxymds/issue-1368-versioning branch July 22, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant