Do not log an interrupted blob upload as an error (closes #434)
check / check (push) Successful in 8m55s

Ctrl-C or SIGTERM cancels the operation's context, which makes the
blob upload in progress fail. The upload step logged that failure at
level ERROR before the interrupted message, so a cancellation the user
asked for read as a storage failure. It now logs the failure only while
the context is still live; only an interrupt cancels it. Any other
upload failure is still logged.

Model: opus-5-5
This commit is contained in:
clawbot committed 2026-11-11 03:09:54 +00:00
1 parent 0d0c76fa24
commit e7c030f215
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)
}