ci: shallow-fetch release-branch-validate checkouts - #31891
ci: shallow-fetch release-branch-validate checkouts#31891chirag-madlani wants to merge 2 commits into
Conversation
Each of the three jobs (Java, Python, UI) used fetch-depth: 0, which does a full clone (~500MB, ~16k files, 30-60s wall-clock) just to compute a two-commit diff. Drop to fetch-depth: 2 — enough for the common single-commit cherry-pick case where BEFORE == HEAD~1 — and fetch BEFORE on demand only when a multi-commit push means it's older than the shallow depth carries. Checkout drops to ~2-5s per job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
✅ Playwright Results — workflow succeededValidated commit ✅ 552 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 0m 49s ⏱️ Max setup 3m 58s · max shard execution 16m 17s · max shard-job elapsed before upload 20m 41s · reporting 6s 🌐 215.79 requests/attempt · 2.83 app boots/UI scenario · 20.37% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedReduces checkout fetch depth to 2 in release branch validation workflows and adds an on-demand fetch fallback for multi-commit pushes, cutting checkout time from up to a minute down to a few seconds. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
The three
Release Branch Validatejobs merged in #31828 usefetch-depth: 0to compute a two-commit diff (github.event.before..HEAD). That's a full clone (~500MB, ~16k files, 30-60s per job). Drop tofetch-depth: 2and fetch the older base on demand only when a multi-commit push meansBEFOREis older than the shallow checkout carries. Checkout step per job drops to ~2-5s.Type of change:
High-level design:
N/A — 3-line change per job, no behavior change beyond the perf win.
Tests:
Use cases covered
BEFORE == HEAD~1, already local, no extra fetch needed.git cat-file -e $BEFOREfails, so wegit fetch --depth=1 origin $BEFOREto pull just that one object (still cheap).workflow_dispatch/ first push to a branch:BEFOREis empty or all-zeros, we fall through togit rev-parse HEAD~1— unchanged from before.Manual testing performed
9.9.9(see ci: auto-revert failing commits on release branches #31828 test transcript).Checklist:
Fixes <issue-number>: <short explanation>— perf follow-up to ci: auto-revert failing commits on release branches #31828, no separate issue.🤖 Generated with Claude Code
Greptile Summary
This PR reduces checkout overhead in the three release-branch validation jobs.
github.event.beforeon demand when it is absent from the shallow clone.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into ci/shallow-fetc..." | Re-trigger Greptile