Repository navigation
ci: default the PR suite policy and R2 cache for fork pull requests - #13717
Conversation
Pull requests from forks do not receive repository variables. Their CI runs saw an empty CI_PULL_REQUEST_SUITE, so choose_ci_suite.py picked the full macOS suite (six app-host shards, lag build, package tests) on every push, and an empty CI_CACHE_R2_PUBLIC_URL / CI_CACHE_BACKEND, so every restore missed. Default each to the value the repository already sets. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughCI workflows now define fallback values for the cache public URL, macOS cache backends, and pull request policy when corresponding configuration is unavailable. ChangesCI default configuration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The CI defaults are internally consistent and no merge-blocking behavior is established. 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ 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 |
|
All contributors have signed the CLA ✍️ ✅ |
…re (#13777) * ci: add a guard for repository variables with no cheap default Fork pull requests receive no repository variables, so every `vars.X` a workflow reads can arrive empty. #13717 found CI running the full macOS suite and missing every cache restore for that reason, and fixed the sites it found. Nothing stopped the next copy of the same expression from landing without a default. This commit adds the guard alone, so CI shows it failing on the 21 sites that still read a repository variable with no literal fallback. The next commit writes those defaults. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: write the cheap default next to every bare repository variable nightly.yml read `vars.CI_CACHE_BACKEND` at 13 sites and test-ios.yml at 5 more with no fallback, so a run without repository variables restored from no cache and rebuilt from cold. nightly.yml also read CI_CACHE_R2_PUBLIC_URL bare while ci.yml, ci-macos.yml and test-ios.yml already defaulted it, and docs-deploy-reusable.yml had a `runs-on:` that an empty LINUX_RUNNER leaves unschedulable. Each now carries the value the repository already sets, which is also the cheap one: the compile-only suite, and the cache that actually has the objects. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Problem
Pull requests from forks don't receive repository variables. In #13275's CI run (head
teamleaderleo:docs/writing-guidance, a docs-only change), thechangesjob loggedPULL_REQUEST_POLICY:andCI_CACHE_R2_PUBLIC_URL:as empty. Sochoose_ci_suite.pyreturnedfull_suite=true. That scheduled all six app-host shards, the lag build and package tests on the Blacksmith macOS pool. The shards are red on main for unrelated reasons (#13643). Every cache restore also missed, because the URL andCI_CACHE_BACKENDwere empty.Same-repo PRs get the variables. On #13688 the same step picked compile-only, and
swift-package-testswas skipped. 11 of teamleaderleo's open PRs are fork-headed.At 17:00 UTC today, the
blacksmith-6vcpu-macos-15pool had 9 jobs running and 22 queued, with the oldest queued 171 minutes. #13688's compile admission was created at 15:14 and started at 16:51. The full-suite fork runs add to that queue. I didn't measure how much of it they account for.Resulting behavior
When a variable is absent, each defaults to the value the repository already sets today:
CI_PULL_REQUEST_SUITEdefaults tocompile-only(ci.yml's suite step). Fork PRs now get the same compile-only tier as same-repo PRs, andfull-cistill opts one in.CI_CACHE_R2_PUBLIC_URLdefaults tohttps://ci-cache.cmux.comin ci.yml, ci-macos.yml, test-ios.yml and cli-pipe-regressions.yml. It's a public read URL, not a secret.CI_CACHE_BACKENDdefaults tor2in ci-macos.yml's restore steps.Same-repo runs are unchanged while the variables are set.
Validation and remaining gap
tests/test_ci_self_hosted_guard.sh.test_current_cli_workflow.py,test_ci_change_areas.pyandtest_check_ghostty_zig_workflows.pyfail the same way on clean main.MACOS_RUNNER_PR) and is not part of this change.Part of #13095.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes CI for fork pull requests, which don't receive repository variables and so ran the full macOS suite with cold caches on every push.
Fork PRs now default to the
compile-onlysuite and the R2 cache URL and backend, matching what same-repo PRs get. Same-repo runs are unchanged since their variables are still set.Written for commit b7b254f. Summary will update on new commits.
Summary by CodeRabbit
r2backend when no backend is explicitly selected.