Commit 891af9b
Skip filter_strip_marker for symlinks during shipit mirror
Summary:
The `oss-mcrouter-darwin-getdeps` (T262442347) and `oss-mcrouter-windows-getdeps`
sandcastle jobs have been failing continuously since D93801016 landed
(2026-02-27) with:
```
FileNotFoundError: [Errno 2] No such file or directory:
'/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/mcrouter/mcrouter/scripts/order_centos-7.2/15_fbthrift'
```
Root cause: mcrouter's `scripts/order_centos-7.2/` directory contains relative
symlinks like `15_fbthrift -> ../recipes/fbthrift.sh`. During
`ShipitPathMap.mirror()`, `os.walk` visits `order_centos-7.2/` before
`recipes/` (alphabetical order). For each file `copy_if_different()` reproduces
symlinks via `os.symlink(target, dest)` — which can be dangling because the
target hasn't been mirrored yet. The new `filter_strip_marker()` call added by
D93801016 then tries to `open(dest_name)`, follows the dangling symlink, and
crashes.
Fix: skip `filter_strip_marker` for symlinks. The actual target file gets its
markers stripped when `os.walk` visits it directly, so behavior on real files
is unchanged.
This unblocks external builds of mcrouter on macOS and Windows, which have
been broken for ~2 months. No production impact — internal mcrouter/uCache
builds use Buck2 and never go through this shipit/getdeps path.
Two earlier attempts addressed the Windows variant of the same bug but did not
land: D98509103 (abandoned) and D98518095 (unpublished, same approach as this
diff). This diff supersedes both and ties to the Darwin task.
#minion-generated-fix
Reviewed By: r-barnes
Differential Revision: D102330897
fbshipit-source-id: 72ca83526b66d088c4094235d8e8727414330d151 parent 465dd47 commit 891af9b
1 file changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
0 commit comments