Commit 085f02b
fix(ci): retry forge solc fetch on transient DNS failures (#24358)
## Problem
PR #24352 (and others) intermittently fail in the merge queue with a DNS
error. The failing step is the `barretenberg/sol` test command:
```
Command: ...cd barretenberg/sol && forge test --no-match-contract Base
Error: error sending request for url (https://binaries.soliditylang.org/linux-amd64/list.json)
Context:
- Error #0: client error (Connect)
- Error #1: dns error
- Error #2: failed to lookup address information: Temporary failure in name resolution
```
`forge` reaches out to `binaries.soliditylang.org` to resolve/fetch the
solc binary. Under heavy parallel merge-queue load the VPC resolver
intermittently drops lookups (`Temporary failure in name resolution`),
and the operation fails with no retry, taking the whole CI run down with
it.
## Fix
Retry the solc-fetching `forge` operations **every 10s for ~5 min** (30
attempts), scoped to connection/DNS failures so genuine errors still
fail fast.
- **`ci3/retry`**: make the attempt count tunable via `RETRY_ATTEMPTS`
(default unchanged at 3); `RETRY_SLEEP` was already honored (default
5s). Fully backward-compatible — existing callers are unaffected.
- **`barretenberg/sol/bootstrap.sh`**: wrap the `forge test` test
command in `RETRY_ATTEMPTS=30 RETRY_SLEEP=10 retry -p '<dns/connect
regex>'`. This is the operation that fails in the merge queue.
- **`l1-contracts/bootstrap.sh`**: the root svm download (the "single
owner of the svm download") already had a short `retry`; extend it to
the same 10s/5-min window and scope it to DNS/connection errors.
(`2>/dev/null` removed so `retry`'s pattern matcher can see the DNS
error on stderr.)
The `-p` pattern (`dns error|Temporary failure in name resolution|error
sending request|failed to lookup address|Connection refused|connection
reset`) means a real `forge test` assertion failure or compile error is
**not** retried — it exits immediately, so this never masks real
failures or wastes 5 minutes on a genuinely broken test.
## Verification
Exercised `ci3/retry` and the exact emitted `barretenberg/sol` command
locally:
- DNS-matching failure → retries up to `RETRY_ATTEMPTS`, sleeping
`RETRY_SLEEP` between attempts.
- Real test failure (no DNS text) → fails fast, no retry (0s).
- Success → returns 0 on the first attempt (0s).
- `RETRY_ATTEMPTS` unset → still 3 attempts (backward-compatible).
---
*Created by
[claudebox](https://claudebox.work/v2/sessions/5610bcb5aef4d0b9) ·
group: `slackbot`*1 parent bba02bf commit 085f02b
3 files changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
0 commit comments