fix(release): prime the macOS x86_64 dependency cache (from #9327) - #9328
Merged
Conversation
added 2 commits
August 31, 2026 23:45
The x86_64 macOS leg has to run on an Intel runner -- the bare macos-15 label is the Arm64 image, whose arm64-only LLVM cannot link an x86_64 binary. Intel runners are materially slower: the arm64 leg takes ~3h40m with a warm cache, and a cold dist build on Intel ran to GitHub's hard 6h ceiling and was cancelled (stage run 33395471638, 13:52:22Z -> 19:52:44Z). It was not a defect. The job compiled through perry-stdlib-static, so the link failure that moved it to this runner is genuinely fixed; it simply ran out of wall clock. The problem is that a cancelled job SKIPS its post-steps, so rust-cache saved nothing -- the leg could not finish without a warm cache and could not warm one without finishing. cache-on-failure does not help: it covers failed jobs, not cancelled ones. Add a preparatory job that compiles the third-party dependencies for that target under a 330-minute timeout, inside the ceiling, with cache-on-failure so the cache is saved even if it does not complete. rust-cache stores dependencies only -- it evicts workspace-crate fingerprints (#4856) -- and those are the bulk of a cold build, so the release build then starts from compiled dependencies and recompiles only workspace crates. It is continue-on-error and shares the build job's cache key, so it is an optimization rather than a gate: if it fails, build runs exactly as before.
…armer prime-macos-x86_64-cache is an optimization with job-level continue-on-error -- the repo's first -- and a needs edge whose skip semantics would cost a silently skipped release to discover. Name the gate instead.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe release workflow adds a non-blocking macOS x86_64 cache-priming job. The build job waits for this job but gates execution only on preflight, test completion, and cancellation status. A changelog entry documents the change. ChangesmacOS x86_64 release cache priming
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow as release-packages workflow
participant PrimeJob as prime-macos-x86_64-cache
participant RustCache as rust-cache
participant BuildJob as build
ReleaseWorkflow->>PrimeJob: start cache priming
PrimeJob->>RustCache: restore or save x86_64 dependency cache
PrimeJob-->>ReleaseWorkflow: complete with success or failure
ReleaseWorkflow->>BuildJob: check preflight and await-tests results
BuildJob->>BuildJob: ignore cache primer result
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 31, 2026
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.
Lands #9327 with one hardening. The author's commit is preserved.
The diagnosis is right and the deadlock is real: the macOS x86_64 leg must run on an Intel runner, a cold
distbuild there hit GitHub's hard 6h ceiling, and a cancelled job skips its post-steps — sorust-cachesaved nothing and the leg could never warm the cache it needed to finish. A priming job withcache-on-failureinside the ceiling breaks that cycle.The hardening.
prime-macos-x86_64-cacheis aneedsdependency ofbuild, and it is this repository's first job-levelcontinue-on-error— every other use is step-level. The PR's stated contract is "if it fails or times out,buildruns exactly as it would have", which relies on GitHub treating acontinue-on-errorjob failure as satisfying aneedsedge. That may well be right, but the cost of it being wrong is a release that silently builds nothing, which is the same shape as the "gate unable to fail" family CLAUDE.md catalogues.So
buildnow names its gate explicitly rather than inferring it:await-testsstays the gate,preflightmust have produced the outputs the signing steps consume, and the warmer's outcome is deliberately unexamined — which is exactly the intent the comment already stated. It holds whatevercontinue-on-errordoes to theneedsedge.Verified: the workflow parses,
build.needsand the newifresolve as intended,check_node_version_consistency.pypasses, andactionlintreports 7 issues on this branch and 7 onorigin/main— no new findings (the two shellcheck style hits at lines 208 and 849 are pre-existing).Separately — not fixed here, and still live:
build-crossat line 1183 still pairsos: macos-15(the Arm64 image) withtarget: x86_64-apple-darwinforperry-ui-macos. That is the same arm64-LLVM-cannot-link-x86_64 mismatch this PR fixes at line 426, one matrix over, and becausebuild-crosssetsfail-fast: falseit fails quietly as a missing x86_64 UI bundle rather than a red release. Worth its own change.Summary by CodeRabbit
Bug Fixes
Documentation