fix(cache): disable setup-bun cache to avoid 5-retry HTML-error burn#1259
Open
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
Open
fix(cache): disable setup-bun cache to avoid 5-retry HTML-error burn#1259MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
Conversation
The upstream oven-sh/setup-bun action saves with a deterministic key (Bun version) that isn't ref-aware. On every second-and-subsequent run against the same PR ref, the GitHub cache API rejects the duplicate key+ref with a 409 (HTML body), and @actions/cache treats the unparsable response as transient and burns ~20-30s on 5 retries before warning. The 35 MB Bun binary downloads in 2-3s, so disabling the cache is a net wallclock win and removes the noisy warning that fires on every PR push after the first. Closes anthropics#1252
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.
Why
Closes #1252.
anthropics/claude-code-action@v1's post-job cache save fails consistently on every second-and-subsequent run against the same PR ref. From the issue:Root cause:
oven-sh/setup-bun@v2.2.0's post step calls@actions/cache.saveCachewith a deterministic key derived from the Bun download URL (bun-<hash>). The key is identical across runs, so on every PR re-push the GitHub cache API rejects the duplicate key+ref with a 409 (HTML body).@actions/cache@5.xtreats the unparsable response as transient and burns ~20-30s on 5 retries before surfacing a warning. The cache key isn't ref-aware andsetup-bundoesn't expose a way to override it, so the issue is unavoidable as long as the cache is enabled.This burns ~20-30s of wallclock per PR push after the first, plus persistent warning noise that masks real cache issues. See #1252 for the full repro and cache-entry inspection.
What
Pass
no-cache: truetooven-sh/setup-bunin bothaction.ymlandbase-action/action.yml. The 35 MB Bun binary downloads frombun.shin 2-3s on GitHub-hosted runners (curl install also relies on this in PR #819), so disabling the cache is a net wallclock win and removes the warning entirely.This is the smallest action-side fix — alternatives would require either patching
setup-bunupstream (issue author's option 2) or replacing it with curl-based install (issue author's option 4 / open PR #819, which targets a separate GHES bug).Tested
Manual verification only — the change is YAML-only inside the composite step, and there are no unit tests for
action.ymlintest/(tests cover TypeScript logic).To verify after merge, run the action twice on the same PR ref and confirm:
Downloading a new version of Bunon every run instead ofUsing a cached version of Bun.