fix(ci): drop --depth=1 from PR diff fetch (no merge base)#391
Merged
Conversation
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.
Contributor
|
[] |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Every PR's
Detect code changesjob (ci.yml line 90) was failing with:…because the script overrode the checkout's
fetch-depth: 0with a shallow re-fetch:--depth=1truncatesorigin/$BASE_REFto 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 changesoutput. With that job failing, every shard was skipped, and theTest (all platforms)aggregator failed withTest 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=1flag. The checkout step already setfetch-depth: 0, so we don't need a second fetch to shrink anything.Test plan
Detect code changesandTest (all platforms)jobs pass