fix: Blossom upload fails over across all servers - #10
Merged
Conversation
A single server's error (a 4xx throttle/whitelist quirk or a 5xx) no longer aborts the upload — the client now tries every mirror in turn and only reports failure when all four fail. Observed in a post-deploy smoke where one server 500'd and another 400'd while a third accepted the same request cleanly; the previous 4xx-abort would have stopped early.
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #9, caught by a post-deploy smoke test.
The client uploaded to the primary Blossom server and only failed over to a mirror on a
5xx/429/network error — a4xxaborted the whole upload. In practice public Blossom servers return varied errors under per-IP load (a real smoke saw one server500, another400, and a third accept the same request cleanly), so a single server's4xxwould stop failover before reaching a working mirror.Now the client tries every server in the mirror set before reporting failure.
validateFilealready caps size/type client-side, so this can't loop on an oversized/unsupported blob.No API/behavior change on the happy path; strictly more resilient on failure. 856/856 tests pass.