Commit 288b5b3
chore: retry and cache the Electron zip download during CI builds
The "Build packages" step fails intermittently on every branch when the
Electron zip download from GitHub's release CDN is reset mid-stream:
RequestError: socket hang up ... code: 'ECONNRESET'
url: .../download/v37.6.0/electron-v37.6.0-linux-x64.zip
@electron/packager fetches that zip through @electron/get, which downloads
via got.stream(). got does not retry streams — its retry config is present
but inert there — so a single reset becomes an unhandled rejection that
kills the build. @electron/get exposes no retry option of its own.
Call downloadArtifact() directly so the download can be retried with
backoff, then hand the file to the packager via electronZipDir so it skips
its own download. The retry also covers the SHASUMS256.txt fetch, which
@electron/get re-requests on every run even on a cache hit.
Also cache the download across builds. @electron/get's default cache root
is platform-specific, so the build job pins it via electron_config_cache
(the same variable the electron package's own installer honors) to keep a
single save_cache path valid on all five platform executors. The cache key
tracks the pinned Electron version, so it invalidates on an upgrade.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 4169413 commit 288b5b3
3 files changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
335 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
336 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
337 | 355 | | |
338 | 356 | | |
339 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
138 | 167 | | |
139 | 168 | | |
140 | 169 | | |
| |||
180 | 209 | | |
181 | 210 | | |
182 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
183 | 220 | | |
184 | 221 | | |
185 | 222 | | |
| |||
0 commit comments