Do not log an upload stopped by Ctrl-C as an error (closes #434)
check / check (push) Successful in 11m33s

Pressing Ctrl-C or sending SIGTERM during a backup logged the interrupted blob upload as an ERROR before the interrupted message. The upload step now skips that record when the backup's context has been cancelled, whatever error the storage returned. An upload that fails for any other reason is still logged.

Model: opus-5-5
This commit was merged in pull request #450.
This commit is contained in:
clawbot committed 2026-11-11 05:30:02 +01:00
1 parent 1a478ef275
commit cdcbe8adfd
2 files changed
+140 -1

No files matched your search

+5 -1
View File
@@ -1861,7 +1861,11 @@ func (s *Scanner) uploadBlobIfNeeded(
err = s.storage.PutWithProgress(ctx, blobPath, blobWithReader.Reader,
finishedBlob.Compressed, progressCallback)
if err != nil {
log.Error("Failed to upload blob", "hash", finishedBlob.Hash, "error", err)
// Only an interrupt cancels ctx, and the user is told about it,
// so an upload it stopped is not logged as a storage failure.
if ctx.Err() == nil {
log.Error("Failed to upload blob", "hash", finishedBlob.Hash, "error", err)
}
return 0, false, fmt.Errorf("uploading blob to storage: %w", err)
}