Skip to content

feat(enterprise): add curated table formatters for list/get commands#763

Merged
joshrotenberg merged 1 commit intomainfrom
feat/enterprise-tabled-rows
Mar 3, 2026
Merged

feat(enterprise): add curated table formatters for list/get commands#763
joshrotenberg merged 1 commit intomainfrom
feat/enterprise-tabled-rows

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

  • Add #[derive(Tabled)] row structs to all Enterprise list/get commands, replacing uncurated generic print_as_table() output
  • Re-export Cloud helpers (DetailRow, extract_field, format_status, truncate_string, output_with_pager) from enterprise/utils.rs and add format_bytes() for RE API byte values
  • Make resolve_auto() public in output.rs for format branching
  • Row structs: DatabaseRow, NodeRow, UserRow, RoleRow, AclRow, ModuleRow, ShardRow, ProxyRow
  • Get commands use DetailRow for vertical key-value display
  • Only list/get commands are affected; status, write, delete, stats, and config commands are unchanged

Closes #761

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo test --lib --all-features -- 89 tests pass
  • cargo test --test '*' --all-features -- 479 tests pass
  • Manual verification with live RE cluster: redisctl enterprise database list, redisctl enterprise node list, etc.

…761)

Add #[derive(Tabled)] row structs to all Enterprise list and get
commands, replacing the generic print_as_table() which dumped all JSON
fields uncurated. This matches the Cloud command patterns established
in PR #760.

Row structs added: DatabaseRow, NodeRow, UserRow, RoleRow, AclRow,
ModuleRow, ShardRow, ProxyRow. Get commands use DetailRow for vertical
key-value display. Cluster get also uses DetailRow.

Output branching uses resolve_auto() (now public) to render curated
tables on TTY and pass through JSON/YAML for piped output. JMESPath
queries are applied before table rendering.
@joshrotenberg joshrotenberg merged commit 3c45151 into main Mar 3, 2026
16 checks passed
@joshrotenberg joshrotenberg deleted the feat/enterprise-tabled-rows branch March 3, 2026 17:04
This was referenced Mar 3, 2026
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.

Add #[derive(Tabled)] row structs for Enterprise commands

1 participant