Commit aa327d5
authored
Add apt-retry wrapper for transient apt mirror failures (#882)
### What
Add a bash wrapper script that retries apt commands with decorrelated
jitter backoff (up to 5 attempts). Apply it to all apt-get update and
install commands in the Dockerfile builder stages and dependencies
script.
### Why
@sisuresh raised today that he'd seen intermittent failures relating to
apt installs.
Docker builds intermittently fail due to transient apt mirror issues.
Analysis of recent failed runs found the following apt-related failures:
| Run | Stage | Error Type | Details |
|-----|-------|------------|---------|
|
[20799747898](https://github.com/stellar/quickstart/actions/runs/20799747898)
| `apt-get install` | 404 Not Found |
`libglib2.0-0t64_2.80.0-6ubuntu3.5_arm64.deb` |
|
[20793261714](https://github.com/stellar/quickstart/actions/runs/20793261714)
| `apt-get install` | 404 Not Found |
`libxslt1.1_1.1.39-0exp1ubuntu0.24.04.3_amd64.deb` |
|
[19283455787](https://github.com/stellar/quickstart/actions/runs/19283455787)
| `apt-get update` | Size mismatch | `Packages.gz - Mirror sync in
progress?` |
|
[19276873082](https://github.com/stellar/quickstart/actions/runs/19276873082)
| `apt-get update` | Size mismatch | `Packages.gz - Mirror sync in
progress?` |
There are two failure patterns:
1. **404 during install** - The package index is stale. `apt-get update`
ran and cached version info, but by the time install runs, the mirror
has newer versions and old .deb files are gone.
2. **Size mismatch during update** - The mirror is actively syncing
while apt-get update is running.
Both are transient and benefit from retries. The 404 errors during
install require re-running `apt-get update` before retrying install,
which is why this PR wraps the entire `apt-get update && apt-get
install` sequence together rather than wrapping each command separately.
Close #8811 parent d08c68f commit aa327d5
File tree
4 files changed
+56
-11
lines changed- .github/workflows
4 files changed
+56
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
137 | | - | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| 213 | + | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
0 commit comments