[TEST] sparse-checkout: dirty doc in deep project path (expect fail)#8871
[TEST] sparse-checkout: dirty doc in deep project path (expect fail)#8871SamuelReeder wants to merge 3 commits into
Conversation
The pre-commit workflow used `actions/checkout` with `fetch-depth: 0`, which fetches every branch in the repo (thousands), making checkout take ~8 minutes. The --from-ref/--to-ref diff only needs full history for the branch being compared against. Replace it with a default shallow checkout plus a targeted fetch of just the base branch, deepened via --unshallow (guarded for already-complete repos) and with --filter=blob:none since `git diff --name-only` only needs trees. This keeps the three-dot merge base resolvable for both PR and push events.
The pre-commit checkout took ~8 minutes. CI logs showed the cost is not branch enumeration but downloading the blob pack for one snapshot of the monorepo: a single commit's working tree is ~43,757 blobs (~9 GB), and a depth-1 fetch of one ref takes ~6 minutes on its own. Switch checkout to a blobless partial clone (`filter: blob:none`) with a minimal sparse-checkout, then widen the sparse cone to only the projects touched by the diff. Blobs for untouched projects are never fetched, so a typical PR fetches megabytes instead of ~9 GB. Project-level granularity keeps each project's configs and local pre-commit hook scripts present even when they live in sibling directories. The base branch is still fetched on its own (commits/trees only) so the three-dot --from-ref/--to-ref merge base resolves without fetching every branch.
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (76.92%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #8871 +/- ##
===========================================
- Coverage 71.34% 71.34% -0.00%
===========================================
Files 2613 2613
Lines 408997 408997
Branches 61114 61114
===========================================
- Hits 291775 291773 -2
- Misses 95825 95826 +1
- Partials 21397 21398 +1
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
Throwaway test PR to validate the blobless sparse-checkout pre-commit workflow (#8863). Based on that branch (so the new workflow runs); the test commit changes only a doc.
Path under test:
projects/hipdnn/docs/TEST_sparse_dirty.md(awk cone ->projects/hipdnn).Expected pre-commit result: FAIL (trailing-whitespace / end-of-file-fixer).