Commit 5dc9fe0
committed
fix: Fetch complete release-branch trees in netlify-fetch
Production builds failed with antora unable to find object e9b0f5d on
release-26.7. That object is the ui/NOTICE blob: release-26.7 is the
first release branch cut after the UI was vendored into this repo, so
ui/ is regular content there instead of a submodule gitlink - and the
blob-materializing loop excluded ui/ from its pathspec checkouts, a
rule written when every release branch still had the submodule. Antora
reads the whole tree of a content branch with isomorphic-git, which
cannot fetch missing objects on demand, and died on the first ui blob.
Reproduced and verified against a fresh blobless clone: with the
exclusion the exact production error appears, without it the build
passes and no tip objects are missing.
Dropping the exclusion is harmless for the old branches: a gitlink has
no blobs to fetch.
Additional hardening while in here:
- branch list from git ls-remote instead of the cached remote-tracking
refs (make expanded the old list before the fetch even ran, so a
brand-new release branch was invisible to its first build)
- no more silent failures: set -e and no -q on fetch abort the build
at the failing command instead of surfacing later as a confusing
antora error
- gc.auto=0 inside the loop and git fetch --all --prune keep the
long-lived netlify build cache tidy and race-free1 parent 1f51229 commit 5dc9fe0
1 file changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
0 commit comments