Skip to content

--per-snapshot flag by @saladpanda#22

Merged
VoltKraft merged 3 commits into
mainfrom
WIP
Apr 27, 2026
Merged

--per-snapshot flag by @saladpanda#22
VoltKraft merged 3 commits into
mainfrom
WIP

Conversation

@VoltKraft

Copy link
Copy Markdown
Owner

No description provided.

saladpanda and others added 3 commits April 26, 2026 16:46
Add --per-snapshot CLI option that shows a column-aligned per-snapshot
table (Unique Size / Shared Size / Total Size) below each guest summary
when used with --all-guests or a single --searchpath.

When combined with --csv-dir, an additional CSV file (snapshots_*.csv)
is written with per-snapshot columns: namespace_path, snapshot_name,
unique_bytes, shared_bytes, total_bytes, unique_chunks.

The overall guest-level summary remains identical to the existing
implementation -- per-snapshot breakdown is computed as extra data
from the same index file analysis.
- Bump __version__ to 2.12.0 (new feature → minor bump)
- Add CHANGELOG entry for 2.12.0
- Add usage examples for --per-snapshot (single guest and --all-guests)
- Add --per-snapshot row to the parameter table
- Add new section explaining the per-snapshot columns
  (Unique / Shared / Total) and the snapshots_*.csv output format
@VoltKraft VoltKraft merged commit d60dd6f into main Apr 27, 2026
1 check passed
@VoltKraft VoltKraft deleted the WIP branch April 27, 2026 18:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a490c2fa6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pbs_chunk_checker.py
Comment on lines +2992 to +2995
if args.per_snapshot and not args.all_guests and not args.searchpath:
parser.error(
"--per-snapshot requires either --all-guests or a single guest searchpath."
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce guest path when enabling --per-snapshot

This validation only checks that --searchpath is present, so --per-snapshot also accepts namespace/root paths (for example /ns/team). In that case main() still calls analyze_guest_per_snapshot(...), which groups indexes by parent directory name and can merge same-named snapshot folders from different guests, producing incorrect unique/shared per-snapshot totals without any error. Please validate non---all-guests paths as a single guest directory (.../(vm|ct)/<id>) before allowing this mode.

Useful? React with 👍 / 👎.

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.

2 participants