Skip to content

fix(ci): drop --depth=1 from PR diff fetch (no merge base)#391

Merged
coseto6125 merged 1 commit into
mainfrom
fix/ci-shallow-fetch
May 23, 2026
Merged

fix(ci): drop --depth=1 from PR diff fetch (no merge base)#391
coseto6125 merged 1 commit into
mainfrom
fix/ci-shallow-fetch

Conversation

@coseto6125
Copy link
Copy Markdown
Owner

Bug

Every PR's Detect code changes job (ci.yml line 90) was failing with:

fatal: origin/main...HEAD: no merge base
Process completed with exit code 128

…because the script overrode the checkout's fetch-depth: 0 with a shallow re-fetch:

git fetch --no-tags --depth=1 origin "$BASE_REF"
diff_range="origin/$BASE_REF...HEAD"

--depth=1 truncates origin/$BASE_REF to its tip, so the three-dot merge-base lookup can't find a common ancestor.

Downstream blast

Test matrix's path filter consumed Detect code changes output. With that job failing, every shard was skipped, and the Test (all platforms) aggregator failed with Test was skipped on PR.

That blocked Mergify routing on PRs #386, #387, #388 (the test PRs for verifying per-area queues) — the queue gate requires Test (all platforms) success.

Fix

Drop the --depth=1 flag. The checkout step already set fetch-depth: 0, so we don't need a second fetch to shrink anything.

Test plan

The 'Detect code changes' job did:

  git fetch --no-tags --depth=1 origin "$BASE_REF"
  diff_range="origin/$BASE_REF...HEAD"

The checkout step already used fetch-depth: 0, so all history was
present locally. The explicit --depth=1 overrode it and truncated
origin/main to just its tip, leaving no common ancestor with HEAD:

  fatal: origin/main...HEAD: no merge base

That failed the Detect-code-changes job, which fed the Test
matrix's path filter, which then skipped every shard, which caused
the 'Test (all platforms)' aggregator to fail with 'Test was
skipped on PR'. Every Mergify routing PR (#386 #387 #388) was
stuck behind this.
@coseto6125 coseto6125 merged commit fe82280 into main May 23, 2026
13 of 14 checks passed
@coseto6125 coseto6125 deleted the fix/ci-shallow-fetch branch May 23, 2026 12:32
@github-actions
Copy link
Copy Markdown
Contributor

[]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecp:risk-low ecp signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant