Skip to content

fix(cli): preserve storage stats across snapshot list filters - #5585

Open
justadityaraj wants to merge 1 commit into
kopia:masterfrom
justadityaraj:fix/snapshot-list-storage-stats
Open

fix(cli): preserve storage stats across snapshot list filters#5585
justadityaraj wants to merge 1 commit into
kopia:masterfrom
justadityaraj:fix/snapshot-list-storage-stats

Conversation

@justadityaraj

Copy link
Copy Markdown

Context

snapshot list --storage-stats calculated deltas after applying --max-results or --reverse, so the same snapshot could report different new-data values depending on display options.

Changes

Calculate storage statistics from the complete chronological snapshot history before applying output ordering and limits. Extend the existing CLI regression test across JSON and text output.

User impact

Storage deltas remain stable when snapshot lists are limited or reversed.

Verification

  • go test ./cli -count=1 — passed
  • go vet -all ./cli — passed
  • golangci-lint v2.6.1 formatter and static-analysis checks — passed
  • make -j4 testcli passed; the full suite retained 16 Windows-host failures that reproduce on master (symlink privileges, log-link behavior, and local-time assumptions)

Fixes #5581
Fixes #3296

@justadityaraj
justadityaraj requested a review from a team August 27, 2026 05:55
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.

snapshot list --max-results produces incorrect storage-stats when filtering is applied --reverse does not work when --storage-stats is used

1 participant