Commit e1d0dac
authored
fix(ci): auto-retry transient Windows compile/clone failures via exit 75 (#4023)
* fix(ci): exit 75 on transient Windows compile/clone failures for auto-retry
Windows compile jobs (and clone/submodule fetch) intermittently fail on
transient network errors such as 'Could not resolve host: index.crates.io'
during cargo's crates.io index fetch, surfacing as NMAKE U1077 / exit 2.
Convert the failure guards in the Windows compile job and the shared
windows_git_setup() helper to 'exit 75'. 75 is in default.retry.exit_codes
(generate-common.php) with max: 2, so GitLab auto-retries these jobs.
git checkout (deterministic) keeps its native exit. Real compile breaks
still surface as failures; they merely retry twice first, which cannot
produce a false pass on a compile job.
* fix(ci): grep build log so only network failures exit 75 on Windows compile
Per review: make the Windows compile steps selective instead of blanket
exit 75. Tee each nmake build's output to a log and exit 75 only when a
transient network signature is present (crates.io DNS, spurious network
error, failed to download, name-resolution/connection timeouts);
otherwise propagate the real exit code so genuine compile breaks fail
fast. The libdatadog target move reverts to native exit (local, not
network). windows_git_setup() clone/submodule guards stay blanket 75
(those steps are network by nature).
* fix(ci): narrow Windows build network-grep to the observed crates.io failure
Drop speculative patterns; match only signatures present in the actual
failure (Could not resolve host / spurious network error / failed to
download).
* fix(ci): don't let build stderr abort the Windows compile capture
The '2>&1 | Tee-Object' capture, under GitLab's default $ErrorActionPreference='Stop',
turned the build's normal native stderr (cargo warnings) into a terminating
NativeCommandError, aborting the job with exit 1 before nmake finished.
Set $ErrorActionPreference='Continue' around the captured docker exec so merged
stderr is emitted rather than thrown, snapshot $LASTEXITCODE, then restore 'Stop'
before the network-signature classification.1 parent c666faf commit e1d0dac
2 files changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | | - | |
549 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
550 | 556 | | |
551 | 557 | | |
552 | 558 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
558 | 570 | | |
559 | 571 | | |
560 | 572 | | |
| |||
0 commit comments