fix(ci): replace fetch-depth: 0 with targeted shallow fetch in detect-changes
Some checks failed
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Waiting to run
lint-required-no-paths / lint-required-no-paths (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 33s
CI / Detect changes (pull_request) Successful in 45s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 49s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 57s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m4s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 50s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 41s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 2m27s
qa-review / approved (pull_request) Failing after 45s
security-review / approved (pull_request) Failing after 45s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 4m19s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 4m2s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 4m7s
CI / Python Lint & Test (pull_request) Successful in 9m54s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4m1s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 6m23s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10m22s
CI / Canvas (Next.js) (pull_request) Successful in 22m12s
CI / Platform (Go) (pull_request) Successful in 23m21s
CI / all-required (pull_request) Successful in 22m45s
CI / Canvas Deploy Reminder (pull_request) Successful in 8s
gate-check-v3 / gate-check (pull_request) Successful in 22s
sop-checklist / all-items-acked (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 15s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m39s
audit-force-merge / audit (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Has been cancelled
Some checks failed
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Waiting to run
lint-required-no-paths / lint-required-no-paths (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 33s
CI / Detect changes (pull_request) Successful in 45s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 49s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 57s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m4s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 50s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 41s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 2m27s
qa-review / approved (pull_request) Failing after 45s
security-review / approved (pull_request) Failing after 45s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 4m19s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 4m2s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 4m7s
CI / Python Lint & Test (pull_request) Successful in 9m54s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 4m1s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 6m23s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10m22s
CI / Canvas (Next.js) (pull_request) Successful in 22m12s
CI / Platform (Go) (pull_request) Successful in 23m21s
CI / all-required (pull_request) Successful in 22m45s
CI / Canvas Deploy Reminder (pull_request) Successful in 8s
gate-check-v3 / gate-check (pull_request) Successful in 22s
sop-checklist / all-items-acked (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 15s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 1m39s
audit-force-merge / audit (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Has been cancelled
Root cause of mc#1314: detect-changes jobs in CI/E2E workflows were running `fetch-depth: 0` (full repository history clone) before computing the git diff. On large repositories this takes 10+ minutes, causing the detect-changes job itself to timeout and fail. Fix: use `fetch-depth: 1` (shallow clone of HEAD only) plus explicit `git fetch --depth=1 origin <BASE> --no-walk` to fetch the BASE commit without its ancestry. This makes detect-changes complete in seconds instead of minutes. Files changed: - ci.yml: changes job - e2e-api.yml: detect-changes job - e2e-staging-canvas.yml: detect-changes job - runtime-prbuild-compat.yml: detect-changes job Lint workflows (lint-mask-pr-atomicity, lint-required-context-exists-in-bp, check-migration-collisions, lint-pre-flip-continue-on-error) retain fetch-depth: 0 because they use `git show <base>:<path>` which needs the full blob set from the base commit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
43a77ccfbc
commit
329efd12a9
@ -84,7 +84,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Shallow clone: only the PR head tip. BASE commit is fetched below.
|
||||
# mc#1314 fix: was fetch-depth: 0 (full history clone), which caused
|
||||
# detect-changes to hang for 10+ minutes on large repos. The diff only
|
||||
# needs HEAD + BASE, so we fetch those two commits explicitly.
|
||||
fetch-depth: 1
|
||||
- id: check
|
||||
run: |
|
||||
# For PR events: diff against the base branch (not HEAD~1 of the branch,
|
||||
@ -107,6 +111,13 @@ jobs:
|
||||
echo "scripts=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# Shallow-fetch the BASE commit explicitly. git fetch --depth=1 with
|
||||
# --no-walk fetches the commit without its full ancestry (fast), then
|
||||
# git diff works because both BASE and HEAD are now in the object store.
|
||||
if ! git cat-file -e "$BASE" 2>/dev/null; then
|
||||
git fetch --depth=1 origin "$BASE" --no-walk 2>/dev/null || \
|
||||
git fetch --depth=50 origin "$BASE" 2>/dev/null || true
|
||||
fi
|
||||
# Workflow-only edits are covered by the workflow lint family
|
||||
# and by this workflow's always-present required jobs. Do not fan
|
||||
# those edits out into Go/Canvas/Python/shellcheck work; the
|
||||
|
||||
@ -117,7 +117,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Shallow clone: only the PR head tip. BASE commit is fetched below.
|
||||
# mc#1314 fix: was fetch-depth: 0 (full history clone), which caused
|
||||
# detect-changes to hang for 10+ minutes on large repos. The diff only
|
||||
# needs HEAD + BASE, so we fetch those two commits explicitly.
|
||||
fetch-depth: 1
|
||||
- id: decide
|
||||
# Inline replacement for dorny/paths-filter — same pattern PR#372's
|
||||
# ci.yml port used. Diffs against the PR base or push BEFORE SHA,
|
||||
@ -131,8 +135,12 @@ jobs:
|
||||
echo "api=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# Shallow-fetch the BASE commit explicitly. git fetch --depth=1 with
|
||||
# --no-walk fetches the commit without its full ancestry (fast), then
|
||||
# git diff works because both BASE and HEAD are now in the object store.
|
||||
if ! git cat-file -e "$BASE" 2>/dev/null; then
|
||||
git fetch --depth=1 origin "$BASE" 2>/dev/null || true
|
||||
git fetch --depth=1 origin "$BASE" --no-walk 2>/dev/null || \
|
||||
git fetch --depth=50 origin "$BASE" 2>/dev/null || true
|
||||
fi
|
||||
if ! git cat-file -e "$BASE" 2>/dev/null; then
|
||||
echo "api=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@ -77,7 +77,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Shallow clone: only the PR head tip. BASE commit is fetched below.
|
||||
# mc#1314 fix: was fetch-depth: 0 (full history clone), which caused
|
||||
# detect-changes to hang for 10+ minutes on large repos. The diff only
|
||||
# needs HEAD + BASE, so we fetch those two commits explicitly.
|
||||
fetch-depth: 1
|
||||
- id: decide
|
||||
# Inline replacement for dorny/paths-filter — see e2e-api.yml.
|
||||
# Cron triggers always run real work (no diff context).
|
||||
@ -94,8 +98,12 @@ jobs:
|
||||
echo "canvas=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# Shallow-fetch the BASE commit explicitly. git fetch --depth=1 with
|
||||
# --no-walk fetches the commit without its full ancestry (fast), then
|
||||
# git diff works because both BASE and HEAD are now in the object store.
|
||||
if ! git cat-file -e "$BASE" 2>/dev/null; then
|
||||
git fetch --depth=1 origin "$BASE" 2>/dev/null || true
|
||||
git fetch --depth=1 origin "$BASE" --no-walk 2>/dev/null || \
|
||||
git fetch --depth=50 origin "$BASE" 2>/dev/null || true
|
||||
fi
|
||||
if ! git cat-file -e "$BASE" 2>/dev/null; then
|
||||
echo "canvas=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@ -59,7 +59,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Shallow clone: only the PR head tip. BASE commit is fetched below.
|
||||
# mc#1314 fix: was fetch-depth: 0 (full history clone), which caused
|
||||
# detect-changes to hang for 10+ minutes on large repos. The diff only
|
||||
# needs HEAD + BASE, so we fetch those two commits explicitly.
|
||||
fetch-depth: 1
|
||||
- id: decide
|
||||
run: |
|
||||
# Inline replacement for dorny/paths-filter — same pattern
|
||||
@ -84,8 +88,12 @@ jobs:
|
||||
echo "wheel=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
# Shallow-fetch the BASE commit explicitly. git fetch --depth=1 with
|
||||
# --no-walk fetches the commit without its full ancestry (fast), then
|
||||
# git diff works because both BASE and HEAD are now in the object store.
|
||||
if ! timeout 30 git cat-file -e "$BASE" 2>/dev/null; then
|
||||
git fetch --depth=1 origin "$BASE" 2>/dev/null || true
|
||||
git fetch --depth=1 origin "$BASE" --no-walk 2>/dev/null || \
|
||||
git fetch --depth=50 origin "$BASE" 2>/dev/null || true
|
||||
fi
|
||||
if ! timeout 30 git cat-file -e "$BASE" 2>/dev/null; then
|
||||
echo "wheel=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user