Commit 499a4d2
committed
perf(ci): build the app image on 16 vCPU and keep the toolchain out of it
Three independent changes to the app image build.
The app image builds on 16 vCPU instead of 8. Its dominant steps -- bun install
(~300-465s) and next build (~262s) -- both scale with cores, and this build gates
every deploy because nothing ships until the image is pushed. The same next build
already runs on 16 vCPU in the Build App verification job, which gates nothing.
The isolated-vm rebuild will not benefit: JOBS=4 caps it deliberately to avoid an
OOM. ARM64 stays at 8 -- that job is off the deploy path, and the workflow warns
an unprovisioned runner label hangs a release in queued.
node-gyp comes from the lockfile rather than npx. npx resolved it from the
registry during every production image build, which pulled 13.x over the pinned
12.4.0 and bypassed the minimumReleaseAge gate in bunfig.toml. It has to be an
apps/sim devDependency because the only other copy is transitive through
@electron/rebuild, which turbo prune sim strips.
base splits into base and build-base. The compiler toolchain exists only to build
isolated-vm against Node and the runner copies the finished binary, so shipping
it inflated every ECS task pull: measured 1.21 GB for base against 1.6 GB for
build-base, so ~390 MB stays out of the final image. ffmpeg and python3 stay --
fluent-ffmpeg is a serverExternalPackage, and node-gyp needs the interpreter.
Verified against real image builds rather than by inspection: g++/make/pip3 are
absent from the runtime image while node/bun/python3/ffmpeg remain, the
isolated-vm native module loads and evaluates, lib0/yjs/y-protocols including the
lib0/logging.js subpath are intact, sharp and libvips load and encode a PNG so
#6499's fix still works against the slimmed image, the container boots to Next.js
Ready, and the full suite passes 21250 tests through the dependency hoisting
reshuffle that promoting node-gyp causes (root which@6.0.1, fluent-ffmpeg keeps
its own 1.3.1).
Not included: an earlier attempt added a cache-key input to
useblacksmith/setup-docker-builder, on the theory that the deps layer re-runs
every build (286s/465s observed) because all five Dockerfiles share one layer
cache. That input does not exist at the pinned SHA or on main, and the key is not
configurable -- setup_builder.ts uses GITHUB_REPO_NAME. CI logs also show the
sticky disk being obtained with a parent snapshot rather than falling back, so
the cache is present and that cause remains unidentified.1 parent c9f7354 commit 499a4d2
4 files changed
Lines changed: 60 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | | - | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
| |||
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
281 | | - | |
| 286 | + | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
19 | 38 | | |
20 | | - | |
| 39 | + | |
21 | 40 | | |
22 | 41 | | |
23 | 42 | | |
| |||
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
32 | | - | |
| 51 | + | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
| |||
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
47 | 73 | | |
48 | 74 | | |
49 | 75 | | |
50 | | - | |
| 76 | + | |
51 | 77 | | |
52 | 78 | | |
53 | 79 | | |
54 | 80 | | |
55 | | - | |
| 81 | + | |
56 | 82 | | |
57 | 83 | | |
58 | 84 | | |
| |||
0 commit comments