The snapshot store tries again: five attempts with doubling waits, and a failure names its key #25

Merged
plat merged 1 commit from snapshot-retry-2 into main 2026-10-13 00:03:19 +00:00
Contributor

The forge's nightly snapshot has not landed since 2026-09-29: the in-cluster MinIO it wrote to stopped accepting its credentials at the move, and the Backups page only said the store "could not be listed just now". Tonight the destination was sealed to Backblaze (off the box at last) and a snapshot taken by hand; it wrote a dozen objects and then failed on one put with S3Error: an unexpected error has occurred and no key named. The same write from the same host, with the same Bun 1.3.14 and the same credentials, succeeded a minute later, in every size and in parallel: an object store's ordinary 5xx, and a store that gave up on the first one.

withRetries wraps the S3 store: every call is tried five times with waits of 0.5, 1, 2 and 4 seconds, and what still fails says which key and why. test/snapshot-store.test.ts (new, in the gate) pins the retries, the waits and the message against a store that fails twice and one that never works.

Toward trevato/forge#1147 (recovery you can print on a notecard): with this live, "Snapshot now" is retried on the Backups page and the first restore drill runs from it.

🤖 Generated with Claude Code

Replaces #23, whose gate checked out a stale sha after the pull was reopened (fatal: reference is not a tree).

The forge's nightly snapshot has not landed since 2026-09-29: the in-cluster MinIO it wrote to stopped accepting its credentials at the move, and the Backups page only said the store "could not be listed just now". Tonight the destination was sealed to Backblaze (off the box at last) and a snapshot taken by hand; it wrote a dozen objects and then failed on one `put` with `S3Error: an unexpected error has occurred` and no key named. The same write from the same host, with the same Bun 1.3.14 and the same credentials, succeeded a minute later, in every size and in parallel: an object store's ordinary 5xx, and a store that gave up on the first one. `withRetries` wraps the S3 store: every call is tried five times with waits of 0.5, 1, 2 and 4 seconds, and what still fails says which key and why. `test/snapshot-store.test.ts` (new, in the gate) pins the retries, the waits and the message against a store that fails twice and one that never works. Toward trevato/forge#1147 (recovery you can print on a notecard): with this live, "Snapshot now" is retried on the Backups page and the first restore drill runs from it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Replaces #23, whose gate checked out a stale sha after the pull was reopened (`fatal: reference is not a tree`).
The snapshot store tries again: five attempts with doubling waits, and a failure names its key
All checks were successful
check / gate (1) (pull_request) Successful in 13m12s
check / gate (2) (pull_request) Successful in 10m5s
check / gate (3) (pull_request) Successful in 13m58s
check / check (pull_request) Successful in 1s
preview / preview (pull_request) Successful in 6s
e583ec4e4a
Tonight's first snapshot to Backblaze failed on one put with 'S3Error: an
unexpected error has occurred' and no key named; the same write from the
same host and Bun version succeeded moments later. Object stores answer a
burst or a moment of maintenance with a 5xx. Every store call is now tried
five times with waits of 0.5, 1, 2 and 4 seconds, and what still fails says
which key and why. test/snapshot-store.test.ts pins the retries, the waits
and the message.
plat merged commit e303edc23a into main 2026-10-13 00:03:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevato-apps/forge!25
No description provided.