You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(local): prune olf's host Docker images and build cache after prefetch and on destroy (#1370 follow-up) #1372
After prefetch loads an image into the kind nodes, its copy in the host's Docker image store is no longer needed: pods run from the nodes' containerd. The build cache from olf's own local image builds (project-code, Superset) also keeps growing. On a machine running the local stack for a few weeks, read from docker system df:
Total
Reclaimable
Images
61 GB (158)
42 GB
Build cache
37 GB (1038 entries)
4.9 GB (reported)
Local volumes
72 GB (18, 3 active)
4.5 GB
Scope
After prefetch, and only for images olf itself pulled or tagged for loading (tools/olf/olf/infra/deployment/local/prefetch.py), remove the host copy. Never remove an image the user had before.
On olf infra destroy for the local provider, prune what olf created:
images it pulled or built;
the build cache of its builds, scoped by label or builder;
nothing of the user's.
Document the trade-off in docs/guides/local-installation.md: the next deploy pulls or rebuilds those images.
If removing host copies would slow every redeploy, put it behind a flag, or make destroy-time pruning the default and post-prefetch pruning opt-in. Decide with measurements.
Done when
The disk freed is measured, on CI (docker system df at the end of local-full-e2e.yml) or locally.
The hardware table or troubleshooting notes in local-installation.md reflect it.
No user-owned image, container, volume or cache entry is ever removed. This is covered by a unit test.
Activity