ci: unshallow submodule fetch to fix intermittent libbacktrace checkout failures#1946
ci: unshallow submodule fetch to fix intermittent libbacktrace checkout failures#1946tonibohnlein wants to merge 1 commit into
Conversation
actions/checkout@v4 defaults to fetch-depth: 1, which fetches submodules with --depth=1 (only each submodule's branch tip). 3rdparty/libbacktrace is pinned (via .gitmodules branch = macho-bundle-support) to a commit that is NOT the current branch tip, so the shallow fetch cannot resolve it: git submodule update --init --force --depth=1 fatal: Needed a single revision Error: Unable to find current revision in submodule path '3rdparty/libbacktrace' This surfaces intermittently (runner-cache dependent) as an actions/checkout failure in dist-system-tests / system-tests, before any build or test runs. Set fetch-depth: 0 on every `submodules: true` checkout so submodules are fetched with full history and the pinned commit always resolves. No submodule pointer or .gitmodules change.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reached
Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
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 |
|
Closing — this approach backfires, so it's a net negative.
Reassessment — there are two independent infra issues, and the change traded a small one for a bigger one:
A safe repo-side fix for (1) alone (deep submodules without unshallowing the main repo) is entangled with (2) and with the private |
Summary
Fixes an intermittent
actions/checkoutfailure that fails CI jobs before any build or test runs — most visiblydist-system-tests/system-tests:Root cause
actions/checkout@v4defaults tofetch-depth: 1, and it fetches submodules at the same depth — i.e.git submodule update --init --force --depth=1, which fetches only each submodule's branch tip.3rdparty/libbacktraceis pinned (via.gitmodules:branch = macho-bundle-support) to a commit that is not the current tip of that branch, so the shallow fetch grabs the tip and can't resolve the pinned commit → "Needed a single revision."It's intermittent because it depends on whether the persistent self-hosted runner's submodule cache already contains the pinned commit; when the cache is cold/cleaned, the shallow re-fetch fails.
Fix
Add
fetch-depth: 0to everysubmodules: truecheckout (8 inci.yml, 3 indaily_ci.yml). With full history,git submodule updatefetches the pinnedlibbacktracecommit unconditionally. No submodule-pointer or.gitmoduleschange — this is checkout config only, so it can't alter what's built.Trade-off: a full clone instead of a shallow one. On the persistent self-hosted runners (where this fails) the fetch is incremental/cached; on the GitHub-hosted
unit-testsjobs it's a modest one-time cost for a small repo.Scope
This is one of a few recurring infra flakes on the device CI. For the record, the others are handled separately:
batch_softmax_prepare(and other) bf16/fp16/fp32-K-split golden ULP flakes → test(st): right-size too-tight golden tolerances across s-tests (bf16/fp16/fp32-K-split) #1945.ASCEND_HOME_PATH is not setduring task-submit artifact reconstruction → runner/task-submit-daemon environment (the workflow already setsASCEND_HOME_PATHat job level +set_env.sh); not fixable in workflow config.