Repository navigation
fix(backend-vercel): retry a write whose answer was lost - #806
Open
vercel[bot] wants to merge 1 commit into
Open
vercel[bot] wants to merge 1 commit into
vercel[bot] wants to merge 1 commit into
Conversation
…that landed is kept
Contributor
Author
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch has not been deployed
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.
From an agent's CLI feedback: in a loop of
tasks claim, 2 of 5 claims printednetwork_error("Vercel's API didn't answer"), yet the claim had landed, so a retry was refused withtask_claimedby the same profile.vercel()'sapi()gave up on a thrownfetchat once, and the claim token it made for that call was lost with it. Now a write the API can tell it has seen (one with anoperationId) goes again on a thrownfetch, as it already does on a 503, with the same body, so the API answers the claim it made with the token the caller gets back.tasks claim(and other task writes) on Vercel's board survives a dropped connection: the claim that landed is returned instead ofnetwork_error.operationIdas it did the first time, as the 503 retry already does.fetchthrows is sent up to 4 more times, with the same 1s-doubling backoff as 503s; before, it failed at once. GETs retry the same way.backend-vercel-tasks.test.tsclaims a task by ID against the fake Vercel messageboard API, with the first claim's answer lost after the API wrote it. Onmainit fails withBoardError: Vercel's API didn't answer: fetch failed; with the fix the retry carries the same operation ID and token and the claim completes.