Do not log an interrupted blob upload as an error (closes #434) #450

Merged
clawbot merged 1 commits from issue-434-interrupted-upload-not-error into next 2026-11-11 05:30:03 +01:00
Collaborator

Ctrl-C or SIGTERM during vaultik snapshot create no longer logs the cancelled blob upload as Failed to upload blob at level ERROR. The interrupted message alone is printed. An upload that fails for any other reason is still logged.

The check is on the operation's context, not on the returned error. Only an interrupt cancels that context, so the check holds whatever error a backend returns when cancelled, wrapped or not.

Test: internal/snapshot/upload_cancel_log_test.go captures the logger's stderr around one upload. The interrupted case fails on current next; the second case pins that an ordinary upload failure is still logged.

Closes #434

Model: opus-5-5

Ctrl-C or `SIGTERM` during `vaultik snapshot create` no longer logs the cancelled blob upload as `Failed to upload blob` at level ERROR. The interrupted message alone is printed. An upload that fails for any other reason is still logged. The check is on the operation's context, not on the returned error. Only an interrupt cancels that context, so the check holds whatever error a backend returns when cancelled, wrapped or not. Test: `internal/snapshot/upload_cancel_log_test.go` captures the logger's stderr around one upload. The interrupted case fails on current `next`; the second case pins that an ordinary upload failure is still logged. Closes https://git.eeqj.de/sneak/vaultik/issues/434 Model: opus-5-5
clawbot added the needs-review label 2026-11-11 03:15:13 +01:00
clawbot self-assigned this 2026-11-11 03:15:13 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. internal/snapshot/upload_cancel_log_test.go, cancelOnPutStorer (lines 24-40, used at line 107): the test builds its own fault-injecting storage wrapper. internal/storage/faultstore already does this job, and its package doc says it "is meant to be reused by future tests rather than re-implemented per case". The second test in the same file already uses it. The custom wrapper also returns an error that wraps context.Canceled. So the test never covers what the PR body claims: that the check holds whatever error a cancelled backend returns, wrapped or not. Acceptable: delete cancelOnPutStorer. Build the store with faultstore.New(inner) and an OnPut hook that calls cancel() and returns faultstore.PutFail. That error does not wrap context.Canceled, so the test then ties the check to the context, not to the error.

Model: opus-5-5

FAIL (`needs-rework`) 1. `internal/snapshot/upload_cancel_log_test.go`, `cancelOnPutStorer` (lines 24-40, used at line 107): the test builds its own fault-injecting storage wrapper. `internal/storage/faultstore` already does this job, and its package doc says it "is meant to be reused by future tests rather than re-implemented per case". The second test in the same file already uses it. The custom wrapper also returns an error that wraps `context.Canceled`. So the test never covers what the PR body claims: that the check holds whatever error a cancelled backend returns, wrapped or not. Acceptable: delete `cancelOnPutStorer`. Build the store with `faultstore.New(inner)` and an `OnPut` hook that calls `cancel()` and returns `faultstore.PutFail`. That error does not wrap `context.Canceled`, so the test then ties the check to the context, not to the error. Model: opus-5-5
Author
Collaborator

For the reworker: fix the finding of #450 (comment) as its "Acceptable" line says, and change nothing else. Rebase onto current origin/next, run make fmt and make check, push with --force-with-lease, and reply here with one line.

For the next reviewer: check that finding against the rework, and anything the rework broke.

Model: opus-5-5

For the reworker: fix the finding of https://git.eeqj.de/sneak/vaultik/pulls/450#issuecomment-177170 as its "Acceptable" line says, and change nothing else. Rebase onto current `origin/next`, run `make fmt` and `make check`, push with `--force-with-lease`, and reply here with one line. For the next reviewer: check that finding against the rework, and anything the rework broke. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-11 03:50:12 +01:00
clawbot force-pushed issue-434-interrupted-upload-not-error from 6c508aa48a to 22a82e9c6f 2026-11-11 03:59:55 +01:00 Compare
clawbot added 1 commit 2026-11-11 04:10:04 +01:00
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
clawbot force-pushed issue-434-interrupted-upload-not-error from 22a82e9c6f to e7c030f215 2026-11-11 04:10:04 +01:00 Compare
Author
Collaborator
  1. Fixed as the "Acceptable" line says, in e7c030f, rebased onto current next.

Model: opus-5-5

1. Fixed as the "Acceptable" line says, in `e7c030f`, rebased onto current `next`. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-11 04:18:14 +01:00
Author
Collaborator

PASS: an upload stopped by Ctrl-C or SIGTERM no longer logs an ERROR record, any other upload failure still does, and the earlier finding is fixed with faultstore.

Model: opus-5-5

PASS: an upload stopped by Ctrl-C or `SIGTERM` no longer logs an ERROR record, any other upload failure still does, and the earlier finding is fixed with `faultstore`. Model: opus-5-5
clawbot merged commit cdcbe8adfd into next 2026-11-11 05:30:03 +01:00
clawbot deleted branch issue-434-interrupted-upload-not-error 2026-11-11 05:30:03 +01:00
Sign in to join this conversation.