Commit cf8c981
committed
fix(infra): Fix race condition in parallel base image builds
The parallel execution of base image builds was causing a race condition,
where dependent images (e.g., `base-builder`) were starting their build
process before their base images (e.g., `base-clang`) had finished
building in the same pipeline.
This resulted in the builder pulling the previously existing, and incorrect,
base image from the registry (e.g., an Ubuntu 20.04-based image instead of
the new 24.04 version).
This commit fixes the issue by introducing an `IMAGE_DEPENDENCIES` map
that explicitly defines the build order. The `get_base_image_steps`
function now uses this map to add `waitFor` clauses to the Google Cloud
Build steps, ensuring that images are built sequentially according to their
dependency graph.1 parent 28e6d65 commit cf8c981
1 file changed
+38
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
85 | 102 | | |
86 | 103 | | |
87 | 104 | | |
| 105 | + | |
| 106 | + | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
| |||
156 | 175 | | |
157 | 176 | | |
158 | 177 | | |
| 178 | + | |
| 179 | + | |
159 | 180 | | |
160 | 181 | | |
161 | 182 | | |
| |||
167 | 188 | | |
168 | 189 | | |
169 | 190 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
175 | 208 | | |
176 | 209 | | |
177 | 210 | | |
| |||
0 commit comments