Skip to content

Add attachment commands (write/ls/read/rm)#184

Merged
atimin merged 9 commits intomainfrom
152-support-for-entry-attachments
Feb 27, 2026
Merged

Add attachment commands (write/ls/read/rm)#184
atimin merged 9 commits intomainfrom
152-support-for-entry-attachments

Conversation

@atimin
Copy link
Member

@atimin atimin commented Feb 26, 2026

Closes #152

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Feature + Fix

What was changed?

  • Added a new top-level attachment command in reduct-cli.
  • Implemented attachment subcommands:
    • attachment write <ENTRY_PATH> <KEY> <JSON>
    • attachment ls <ENTRY_PATH>
    • attachment read <ENTRY_PATH> [KEY ...]
    • attachment rm <ENTRY_PATH> <KEY ...> or attachment rm <ENTRY_PATH> --all
  • Added shared entry path parsing for ALIAS_OR_URL/BUCKET/ENTRY (including base-path URLs).
  • Added consistent handling for entries without attachment metadata (entry/$meta not found -> empty set for read/list operations).
  • Added tests for argument validation and end-to-end attachment behavior (write/read/list/remove).
  • Fixed cp progress estimation:
    • use time-window-based progress when no limit is set (aligned to entry oldest/latest and --start/--stop),
    • use record-count-based progress when limit is set via --limit or --when ($limit).
  • Reduced duplication in attachment/cp tests and helper flows.
  • Updated CHANGELOG.md under Unreleased.
  • Included existing branch changes removing local .vscode files and refreshing dependency lockfile versions.

Related issues

Does this PR introduce a breaking change?

No.

Other information:

  • attachment rm now requires an explicit remove target: key(s) or --all.

@atimin atimin linked an issue Feb 26, 2026 that may be closed by this pull request
@atimin atimin enabled auto-merge (squash) February 26, 2026 21:20
@atimin atimin requested a review from a team February 26, 2026 21:20
@atimin atimin merged commit 82470dc into main Feb 27, 2026
13 checks passed
@atimin atimin deleted the 152-support-for-entry-attachments branch February 27, 2026 10:03
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.

Support for Entry Attachments

2 participants