Repository navigation
fix(cache): stop reporting failed reservations as a benign race - #663
Merged
Merged
Conversation
A failed cache reservation returned the same status as a real conflict, so cook-cache logged "skipped-race-precheck error=none" for a layer that was never written, hiding 5xx, 429 and auth failures. reserve() now returns reserved | conflict | failed, and TwoPhaseCacheResult gains "reservation-failed", which cook-cache maps to status=failed. The v2 twirp client throws on non-2xx and exposes no status on its response, so a real 409 is recognized from the thrown "Failed request: (409)" text. Errors are redacted before logging. cook-post now prints error= as well. Fixes #662 Co-Authored-By: Claude Opus 5.5 <[email protected]>
zackees
added a commit
to obs-rust/obs-studio
that referenced
this pull request
Nov 7, 2026
…p backoff) Consumers pin zackees/setup-soldr by SHA, so the two merged fixes in #661 and #663 are inert here until the pin moves. Both are fixes, neither changes inputs: - forge-ci/setup-soldr#663: a failed cache reservation is no longer reported as a successful race. The Linux cook-cache layer has never existed in this repository while every run logged 'save status=skipped-race-precheck error=none'; after this, a reservation that fails reports 'save status=failed error=<status>' instead of the benign sentence. That is what makes the missing Linux layer diagnosable at all. - forge-ci/setup-soldr#661: bootstrap backs off transient release download retries instead of failing the job. 12 pins updated across build-project.yaml and release-rust.yaml, plus the SETUP_SOLDR_PIN constant in ci/test_ci_toml.py that asserts they all agree (47 tests pass). SETUP_SOLDR_COOK_PREFIX stays cook-base-v3: COOK_BASE_KEY_PREFIX is unchanged at the new SHA, so the deps cache family is unaffected. Compare c6f5541a...d01d9bae: 4 commits, 14 files, all fixes.
chriscoveries
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Nov 7, 2026
…p backoff) (obs-rust#3790) Consumers pin zackees/setup-soldr by SHA, so the two merged fixes in obs-rust#661 and obs-rust#663 are inert here until the pin moves. Both are fixes, neither changes inputs: - forge-ci/setup-soldr#663: a failed cache reservation is no longer reported as a successful race. The Linux cook-cache layer has never existed in this repository while every run logged 'save status=skipped-race-precheck error=none'; after this, a reservation that fails reports 'save status=failed error=<status>' instead of the benign sentence. That is what makes the missing Linux layer diagnosable at all. - forge-ci/setup-soldr#661: bootstrap backs off transient release download retries instead of failing the job. 12 pins updated across build-project.yaml and release-rust.yaml, plus the SETUP_SOLDR_PIN constant in ci/test_ci_toml.py that asserts they all agree (47 tests pass). SETUP_SOLDR_COOK_PREFIX stays cook-base-v3: COOK_BASE_KEY_PREFIX is unchanged at the new SHA, so the deps cache family is unaffected. Compare c6f5541a...d01d9bae: 4 commits, 14 files, all fixes.
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.
Fixes #662.
Problem
A failed cache reservation (5xx, 429, expired token, missing
signedUploadUrl) produced the same status as a real conflict, socook-cacheloggedsave status=skipped-race-precheck error=nonefor a layer that was never written.Change
reserve()returns{kind:"reserved",reservation} | {kind:"conflict"} | {kind:"failed",message}on both the v2 and v1 paths.TwoPhaseCacheResultgainsreservation-failedwith anerror.skipped-reservationnow only means a real conflict.cook-cache.tscall sites mapreservation-failedto{status:"failed", error}.post.tsalready renders that status.error.cook-post.tsnow printserror=on itssave status=lines. Without this the standalone cook action would showfailedwith no reason.How conflicts are detected
CreateCacheEntryResponseonly hasok,signedUploadUrlandmessage. The v2 client throws on any non-2xx, with the status only in the text:Failed to CreateCacheEntry: ... Failed request: (409) Conflict: <msg>. Classification therefore runs on the thrown message as well as the response, and a status in the text decides on its own. Checking only the response would have reported every ordinary race as a failure.v1 uses
response.statusCode === 409directly.Behaviour changes to review
cook/action.ymlwithfail-on-error: truenow fails the job on a reservation failure. Previously this was a silent skip. This matches that input's description, and the default isfalse.ok:falsewith no "already exists" text is nowfailed. Upstream@actions/cachetreats it as a possible race, so this errs towards reporting.Bundles
dist/main.js,dist/post.jsandcook/dist/*are rebuilt. Most of the large line count is ncc renumbering its module IDs, so reviewsrc/rather than the bundle diff.Verification
npm ci, thennpm run lint,npm run typecheck,npm run buildandnpm test: all exit 0 (1071 tests: 1070 pass, 0 fail, 1 skipped; pretest 12/12). The tests send 409, 500, 429, 401 and 403 through the real twirp client against a local HTTP server. They have not run against the live GitHub cache service.🤖 Generated with Claude Code