mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
I had this wrong in the previous commit and am reverting that part. The build
does not OOM. The kubelet evicts the runner pod:
git-runner-5 Evicted: Usage of EmptyDir volume "docker-storage"
exceeds the limit "38Gi"
git-runner-7 Evicted: node was low on resource: ephemeral-storage
MemoryPressure=False, node memory usage 7%
Eviction restarts the pod, which restarts dockerd, which is what I read as an
OOM kill. Both look identical from the job log -- it truncates mid-export with
no error and the run sits in_progress -- so the only way to tell them apart is
to ask the kubelet, which I should have done first.
Reverts the worker/heap bound: memory was never the constraint, and lowering
the heap only made the build slower and hold its disk for longer.
Fixes the actual constraint, in the order they matter:
- .dockerignore, which did not exist, so COPY . . shipped the entire tree.
A tree that has ever been built locally carries ~16G of artifacts that the
build immediately regenerates. Context: 16G -> 323M.
- rm -rf .next and the turbo cache in the SAME RUN that creates them, ~9G.
A later RUN would free nothing; the earlier layer still stores the files.
- a reclaim step that prunes the runner and prints df before and after, so
the next failure of this kind is legible in its own log.
The pool is still over-subscribed -- two runners per node, each with a 38Gi
emptyDir, on a ~98G disk -- and that is a universe change, not a docs one.
Co-authored-by: Hanzo Dev <[email protected]>
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
# What `COPY . .` must NOT carry into the build.
|
|
#
|
|
# There was no .dockerignore, so the build context was the whole working tree.
|
|
# On a clean CI checkout that is mostly source, but a tree that has ever been
|
|
# built locally carries ~16G of artifacts -- apps/docs/.next 6.9G, apps/docs/out
|
|
# 6.4G, .turbo/cache 2.4G -- and every byte of it was being copied into a build
|
|
# that immediately regenerates all three. The build then runs inside a 38Gi
|
|
# docker-storage volume, so the waste is not merely slow: it is the difference
|
|
# between finishing and being evicted mid-export.
|
|
#
|
|
# Excluding build output also keeps the image HONEST. Without this, a stale
|
|
# local `out/` is copied in, and if the build were ever to not overwrite it the
|
|
# export gate would pass on bytes from a previous build rather than this one.
|
|
|
|
# Build output and caches -- all regenerated inside the image.
|
|
**/node_modules
|
|
**/.next
|
|
**/out
|
|
**/dist
|
|
**/.turbo
|
|
.turbo
|
|
**/.cache
|
|
**/*.tsbuildinfo
|
|
|
|
# History. 775M, and nothing in the build reads it.
|
|
.git
|
|
.gitignore
|
|
.github
|
|
|
|
# Local/editor/OS noise.
|
|
**/.env
|
|
**/.env.*
|
|
!**/.env.example
|
|
**/.DS_Store
|
|
**/npm-debug.log*
|
|
**/pnpm-debug.log*
|
|
.vscode
|
|
.idea
|
|
|
|
# Docs about shipping, not inputs to it. Excluded so that editing them cannot
|
|
# invalidate the build cache -- and so a commit that only touches them produces
|
|
# a byte-identical export, which RELEASE.md relies on when deciding whether a
|
|
# rebuild is owed.
|
|
RELEASE.md
|
|
LLM.md
|
|
CLAUDE.md
|
|
screenshots
|
|
documents
|