Commit 5e6ea3c
authored
tools, .github/workflows: harden EEST fixture download and warm its cache out-of-band (erigontech#21674)
## Problem
The `eest-spec-*` checks failed on a recent run
([example](https://github.com/erigontech/erigon/actions/runs/27119504237))
with:
```
curl: (22) The requested URL returned error: 504 ← x4
make: *** [Makefile:271: test-fixtures-eest] Error 22
```
Two distinct issues surfaced:
1. **Transient download failures.** On a cache miss,
`tools/test-fixtures.sh` downloads fixture tarballs directly from the
GitHub release CDN. It retried only `--retry 3` over a fixed ~6s window,
which couldn't ride out a burst of HTTP 504s.
2. **Cache-entry churn + cold misses.** `test-eest-spec.yml` used
`actions/cache` (restore **and** save), so every PR ref
(`refs/pull/<N>/merge`) saved its own ~1.6 GB copy of identical fixture
tarballs. Sibling PR refs can't read each other's caches, so this gave
no shared-hit benefit and churned the shared cache budget via LRU. There
was also no default-branch (`main`) entry, so every PR cold-missed in
the first place.
## Fix
- **`tools/test-fixtures.sh`** — curl exponential backoff over a
5-minute window, fail-fast connect, and DNS re-resolution each attempt
(CDN records can rotate on short TTLs):
```
--retry 10 --retry-all-errors --retry-delay 0 --retry-max-time 300
--connect-timeout 30 --dns-cache-timeout 0
```
- **`test-eest-spec.yml`** — switch to `actions/cache/restore`
(**restore-only**). PR / merge_group runs never save, so no per-ref
duplicates. A miss self-heals via `tools/test-fixtures.sh`.
- **`cache-warming-eest-fixtures.yml` (new)** — a dedicated workflow
that populates the base-branch cache, since default-branch caches are
readable from every PR. It runs on `test-fixtures.json` change + every 2
days (cron) + `workflow_dispatch`, probes with `lookup-only`, and
downloads + saves only on a real miss, fetching all four tarballs so the
entry is complete.
Design notes: key kept as `hashFiles('test-fixtures.json')`;
`cl_mainnet` intentionally excluded (owned by
`test-integration-caplin.yml`); default cache compression kept —
restore-only moves compression off the PR critical path into the
infrequent warmer (`actions/cache` exposes no public switch to disable
it — see actions/toolkit#544).
## Bootstrap note
After merge the warmer won't auto-fire (it doesn't change
`test-fixtures.json`), so until the next 2-day cron tick PRs would
cold-miss (self-healing, just slower). Run the **`Cache Warming — EEST
fixtures`** workflow once via `workflow_dispatch` right after merge to
populate the `main`-scoped cache immediately.
## Verification
- `actionlint` (bundles shellcheck) — clean on both workflows.
- `bash -n tools/test-fixtures.sh` — clean.
- YAML parses.1 parent 32e1afe commit 5e6ea3c
3 files changed
Lines changed: 91 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
0 commit comments