Skip to content

feat(backup): show what a backup lacks in list, show, status and the --wait results - #40

Merged
xe-nvdk merged 2 commits into
mainfrom
feat/backup-list-incomplete
Oct 1, 2026
Merged

xe-nvdk merged 2 commits into
mainfrom
feat/backup-list-incomplete

Conversation

@xe-nvdk

@xe-nvdk xe-nvdk commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to Basekick-Labs/arc#981 (arc#977), which makes a backup's incompleteness visible on every Arc backup endpoint. arcli's listing help said "the listing cannot tell whether a backup is incomplete"; now it can.

  • Client types mirror the server's fields: listing skipped_files, skipped_metadata_files, unaddressable_files; manifest skipped_metadata_files, skipped_sample, skipped_overlong_keys, unaddressable_files, unaddressable_sample, iceberg_warehouse.skipped_files; progress skipped_sample, unaddressable_files / unaddressable_sample, backup_skipped_files, backup_unaddressable_files, iceberg_warehouse_files_skipped. Absent keys (Arc < 26.09.3) read as zero.
  • backup list: new INCOMPLETE column, - when the server reports nothing missing, otherwise the counts the server keeps apart, e.g. 3 skipped, 1 metadata, 2 unaddressable, never summed (skipped data files are inside FILES, metadata skips are not, unaddressable files were never inventoried). -o csv appends skipped_files, skipped_metadata_files, unaddressable_files after total_size_bytes. -o json unchanged (raw passthrough).
  • backup show: the INCOMPLETE line says the counts in words ("3 of 21 files and 1 metadata file were skipped while backing up (1 for a key too long to store); 2 files could not be listed (unaddressable); 1 Iceberg warehouse file was skipped"), followed by one skipped: line per name in the manifest's sample and one unaddressable: line per name in that sample.
  • backup status and the final status of create --wait / restore --wait: list the skipped files the server names; report files a backup could not list (the manifest has their names); for a restore, say what the restored backup already lacked when it was taken and how many outside-root warehouse files were not restored. The server's error already carries a failed restore's counts, so only names and the backup's own gaps are added.
  • create --wait ends its success line with every gap ("(1 files skipped, 1 files could not be listed — the backup is incomplete)"), prints the names, and points at backup show for the full breakdown.
  • restore warns before restoring a backup that lacks files for any reason the manifest records (previously only skipped data files), and says how many of the skipped files had keys too long to store.
  • Release notes docs/releases/v26.09.5.md. Docs: Basekick-Labs/docs.basekick.net (arcli backup page; also corrects the arc restore-error example to the server's current wording), docs(arcli): backup list INCOMPLETE column, show and status naming skipped files docs.basekick.net#95.

Plan was reviewed adversarially before implementation; its findings (never sum the populations, the server's "unaddressable" vocabulary, unaddressable-only backups on status, restore pre-flight gate, print the sample on the success path) are in.

Test plan

  • TestBackup_IncompleteIsVisible (fixtures in the shapes Arc 26.09.3 produces; list table/csv/--no-header, show block and sample lines, backup status, restore pre-flight warning, failed-restore status) and TestBackup_CreateWaitReportsIncomplete (fake server toggle); both compile against main and fail there. Client TestBackup_IncompleteShapes decodes every field and reads zero where keys are absent.
  • go test -race -count=1 ./..., gofmt -l ., go vet ./... clean.
  • Binary run against an Arc built from arc main (post-#981) with backups enabled: one unreadable Parquet file → create --wait prints "completed: 23 files, 19.7 KiB (1 files skipped — the backup is incomplete)", the skipped: line and the show hint; list shows 1 skipped, csv …,1,0,0, json untouched; show prints "INCOMPLETE: 1 of 24 files was skipped while backing up" and the name; status names it; after a clean backup the new entry reads -.
  • Adversarial plan review before implementation
  • Configuration matrix + deep reviewer; no blockers; the one High (unaddressable hint before a manifest exists) and the wording, gate and test findings addressed in the fix-up commit, re-verified live on the failed-backup and unaddressable paths
  • CI green

…--wait results

Arc 26.09.3 reports a backup's incompleteness on every backup endpoint:
the listing carries skipped_files, skipped_metadata_files and
unaddressable_files; the manifest names up to 32 skipped files in
skipped_sample and counts overlong keys in skipped_overlong_keys; the
status endpoint names a backup's skipped files as it already did for a
restore. arcli ignored all of it and its list help said the listing
could not tell whether a backup is incomplete.

The client types mirror the fields. "backup list" gains an INCOMPLETE
column: "-" when the server reports nothing missing, otherwise the
counts the server keeps apart ("3 skipped, 1 metadata, 2 unaddressable"),
never summed, because skipped data files are inside the file total,
metadata skips are not, and unaddressable files were never inventoried;
csv appends the three columns. "backup show" says the counts in words,
including how many skips were for a key too long to store and how many
outside-root Iceberg warehouse files were skipped, then names the files.
"backup status" and the final status of "--wait" list the skipped files
the server names, report files a backup could not list, and, for a
restore, what the restored backup already lacked and the warehouse files
left out. "create --wait" ends its success line with every gap, prints
the names, and points at "backup show". "restore" warns before restoring
a backup that lacks files for any reason the manifest records.

Against an Arc older than 26.09.3 everything reads as none reported.
…xists; restore warning in show's shape

Review fix-up. A backup publishes its unaddressable count before copying
but names the files only in its manifest, which exists once it has
completed; while it runs, or after it failed, "backup status" now sends
the operator to the server log instead of to a "backup show" that would
answer not found.

The restore pre-flight warning takes the same shape as "backup show":
the overlong-key clause hangs on the joined skipped sentence, because the
server counts overlong keys across data and metadata files alike, so a
metadata-only overlong skip is no longer dropped or charged to the data
files; plurals are right; and a backup whose only gap is outside-root
Iceberg warehouse files warns too, as the release note already claimed.

A completed "restore --wait" now says what the restored backup lacked
and how many warehouse files were not restored, the one gap no earlier
surface can show when the node has Iceberg off. The "backup show" hint
after "create --wait" moves to stderr with backticks like the file's
other hints; "N of M files" falls back to "N files" for a manifest from
before the data/metadata split, where N can exceed M. Tests cover json
passthrough, the metadata-only singular case, and the failed and running
backup status hint.
@xe-nvdk
xe-nvdk marked this pull request as ready for review October 1, 2026 23:00
@xe-nvdk
xe-nvdk merged commit 3f76565 into main Oct 1, 2026
3 checks passed
@xe-nvdk
xe-nvdk deleted the feat/backup-list-incomplete branch October 1, 2026 23:20
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