ci(cache-qualification): skip the OIDC probe for fork PRs - #1335
Conversation
Fork pull requests run with a read-only GITHUB_TOKEN and GitHub refuses
to issue an OIDC token for them (id-token: write is ignored), so
ACTIONS_ID_TOKEN_REQUEST_URL is empty and the cache-auth probe exits
with curl error 3 ("URL malformed"). The final gate then hard-errors
on cache-qualification: failure.
Skip cache-qualification when github.event.pull_request.head.repo.fork
is true, and have the final gate treat that skip as OK via a FORK_PR
env var. Same-repo PRs and main pushes keep running the probe
unchanged.
Rides the same change already proven on jdx#1325/jdx#1326/jdx#1327 so landing
it on main lets those merge cleanly and fixes future fork PRs.
|
Warning Review limit reached
Next review available in: 20 minutes Limit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
Greptile SummaryThe PR prevents fork pull requests from failing when GitHub withholds the OIDC token required by cache qualification.
Confidence Score: 5/5The PR appears safe to merge because the new fork-specific skip is narrowly scoped and consistently handled by the final gate. The cache qualification job and final aggregator use matching fork and manual-dispatch conditions, while non-fork pull requests and main runs continue requiring successful cache qualification. Important Files Changed
Reviews (1): Last reviewed commit: "ci(cache-qualification): skip the OIDC p..." | Re-trigger Greptile |
Root cause
Fork pull requests run with a read-only
GITHUB_TOKENand GitHub refuses to issue an OIDC token for them —id-token: writeinpermissions:is silently ignored for fork PRs. As a resultACTIONS_ID_TOKEN_REQUEST_URLis empty, and thecache-qualificationcache-auth probe (acurlto that URL) exits with curl error 3 ("URL malformed"). Thefinalgate then hard-errors oncache-qualification: failure, red-lining every fork PR even when the rest of CI is green.This never reproduces on
mainor same-repo PRs because those contexts do get an OIDC token, so the probe runs normally.Fix
Two targeted changes in
.github/workflows/ci.yml, both gating only on the fork condition:cache-qualificationjob — append&& github.event.pull_request.head.repo.fork != trueto itsif:, so it skips (neutral, not failed) on fork PRs. Same-repo PRs andmainpushes keep the existingif:behavior and still run the probe.finalgate — add aFORK_PR: ${{ github.event.pull_request.head.repo.fork }}env var and, when it is"true", addcache-qualificationtoSKIP_OK. The gate already has this exact pattern for theworkflow_dispatchnon-main case, so this mirrors the proven shape.Net behavior:
cache-qualificationfinalmainpushProvenance
This is the same
ci.ymlchange already applied inline on three feature PRs so they could pass CI from forks:Landing it standalone on
mainmeans:ci.ymlconflict between them).jdx/aubepass CI without needing to re-apply the workaround.The diff is
ci.yml-only — no feature code, nomise.toml, no behavior change for non-fork events.