A file that phase 1 of snapshot create counted and phase 2 could not open (unreadable under --skip-errors, or removed between the phases) went into the unchanged count, and its size stayed in BytesScanned. The summary showed it as unchanged with its bytes backed up, and the snapshots row's file_count and total_size included it.
Changes:
ScanResult gains FilesFailed. Both skip paths in phase 2 now count the file there and subtract its size from BytesScanned, where they used to increment FilesSkipped.
The summary's files line adds , N failed when N is not zero. "backed up" is now examined minus unchanged minus failed.
file_count is the files examined minus the failed ones. total_size is right through BytesScanned.
The comment on BackupStats.TotalSize said "all files examined" and now says the files in the snapshot.
Things the diff does not show:
"examined" still includes the failed file, so examined = backed up + unchanged + failed.
The test fails the open through an afero.Fs wrapper rather than chmod 000. The Docker test phase runs as root, and root can open a mode-000 file.
The live progress reporter's counters are not changed.
Judgement call: a directory that phase 2 cannot record is not counted as failed, because phase 1 does not count directories. Not tested: phase 2 fails on a directory only when a database write fails.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/280.
A file that phase 1 of `snapshot create` counted and phase 2 could not open (unreadable under `--skip-errors`, or removed between the phases) went into the unchanged count, and its size stayed in `BytesScanned`. The summary showed it as unchanged with its bytes backed up, and the `snapshots` row's `file_count` and `total_size` included it.
Changes:
- `ScanResult` gains `FilesFailed`. Both skip paths in phase 2 now count the file there and subtract its size from `BytesScanned`, where they used to increment `FilesSkipped`.
- The summary's files line adds `, N failed` when N is not zero. "backed up" is now examined minus unchanged minus failed.
- `file_count` is the files examined minus the failed ones. `total_size` is right through `BytesScanned`.
- The comment on `BackupStats.TotalSize` said "all files examined" and now says the files in the snapshot.
Things the diff does not show:
- "examined" still includes the failed file, so examined = backed up + unchanged + failed.
- The test fails the open through an `afero.Fs` wrapper rather than `chmod 000`. The Docker test phase runs as root, and root can open a mode-000 file.
- The live progress reporter's counters are not changed.
Judgement call: a directory that phase 2 cannot record is not counted as failed, because phase 1 does not count directories. Not tested: phase 2 fails on a directory only when a database write fails.
Model: opus-5-5
A file that phase 1 of a backup counted and phase 2 could not open,
because it was unreadable under --skip-errors or removed in between,
was added to the unchanged count while its size stayed in
BytesScanned. The summary showed it as unchanged with its bytes backed
up, and the snapshots row's file_count and total_size included it.
The scanner now counts such a file in FilesFailed and takes its size
out of BytesScanned. The summary's files line adds "N failed", and
file_count leaves the file out.
A directory phase 2 cannot record is not counted as failed, since
phase 1 counts no directories; that case has no test.
Model: opus-5-5
Rebased onto current next after #279 landed; the only conflict was TODO.md, where both entries are kept with this one first. No other change.
Model: opus-5-5
Rebased onto current `next` after https://git.eeqj.de/sneak/vaultik/pulls/279 landed; the only conflict was `TODO.md`, where both entries are kept with this one first. No other change.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #280.
A file that phase 1 of
snapshot createcounted and phase 2 could not open (unreadable under--skip-errors, or removed between the phases) went into the unchanged count, and its size stayed inBytesScanned. The summary showed it as unchanged with its bytes backed up, and thesnapshotsrow'sfile_countandtotal_sizeincluded it.Changes:
ScanResultgainsFilesFailed. Both skip paths in phase 2 now count the file there and subtract its size fromBytesScanned, where they used to incrementFilesSkipped., N failedwhen N is not zero. "backed up" is now examined minus unchanged minus failed.file_countis the files examined minus the failed ones.total_sizeis right throughBytesScanned.BackupStats.TotalSizesaid "all files examined" and now says the files in the snapshot.Things the diff does not show:
afero.Fswrapper rather thanchmod 000. The Docker test phase runs as root, and root can open a mode-000 file.Judgement call: a directory that phase 2 cannot record is not counted as failed, because phase 1 does not count directories. Not tested: phase 2 fails on a directory only when a database write fails.
Model: opus-5-5
ca98a6d5e1to403598ff25Rebased onto current
nextafter #279 landed; the only conflict wasTODO.md, where both entries are kept with this one first. No other change.Model: opus-5-5
Review passed.
Model: opus-5-5