Title: improvement(ci): measure where the layer-cache disk actually goes by waleedlatif1 · Pull Request #7521 · simstudioai/sim · GitHub
Open Graph Title: improvement(ci): measure where the layer-cache disk actually goes by waleedlatif1 · Pull Request #7521 · simstudioai/sim
X Title: improvement(ci): measure where the layer-cache disk actually goes by waleedlatif1 · Pull Request #7521 · simstudioai/sim
Description: The problem The layer-cache cap is enforced against buildctl du, and on the busiest disk that number no longer describes the disk. From a single real job (app image, amd64): before prune -> Total: 65.87GB after prune -> Total: 65.87GB (keep-storage 102400 MB) The prune is behaving correctly — 65.87 GB is already under the 100 GB cap, so there is nothing to trim. Meanwhile that sticky disk reports 224.9 GB. The control is the same Dockerfile on the other architecture: disk buildctl du actual disk gap app.Dockerfile/linux-amd64 65.87 GB ~241 GB 3.7× app.Dockerfile/linux-arm64 88.04 GB ~93 GB ~1× Same image, same 100 GB cap, both disks created 2026-08-29. The only difference is build frequency — amd64 builds on every push to main and staging, arm64 only on main. So the divergence tracks write churn, not image content. Why this is a diagnostic and not a fix Two causes fit the symptom, and they need opposite fixes: Thin-provisioned volume not releasing freed blocks. Sticky disks are Ceph block volumes cloned and committed per job, so a filesystem that deletes files without discard would grow monotonically. Fix would be fstrim. Real files du's total does not cover. The RUN --mount=type=cache dirs (apt ×2, bun, npm, next, turbo) are a different record class from the layer cache --keep-storage trims. Fix would be bounding or dropping specific mounts. One log line argues against (1) — Filesystem free space after mount: 527497363456 bytes (491.27 GiB) implies the filesystem really is holding those bytes — but that is a single indirect reading, not proof, and shipping fstrim or deleting a cache mount on it would be guessing. So this adds the three readings that separate the cases: df — the filesystem's own view, versus buildkit's. buildctl du --verbose summarised by record type — whether cache mounts are accounted for at all. a bounded du -x -d1 walk — where the bytes actually live, if they are not. One or two builds of output settles it, and the follow-up fix is then evidenced rather than assumed. Safety Composite steps run under bash -e -o pipefail, where a failing command inside an assignment or pipeline aborts the step and fails the build — the bug that broke a real app image build in #7252. Every command here is guarded, and the directory walk is bounded by timeout 120. Verified rather than assumed: the block was run under bash --noprofile --norc -e -o pipefail with every command failing (no buildkitd, no /var/lib/buildkit locally). It reaches the end and exits 0. Shellcheck clean. This step already could not fail a deploy by design — that property is preserved. Type of Change Improvement Testing Executed the block under the exact composite-step shell flags with all commands failing (exit 0, reached end marker). Shellcheck clean. No behaviour change to the prune itself — this is additive output after the existing before/after readings. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: The problem The layer-cache cap is enforced against buildctl du, and on the busiest disk that number no longer describes the disk. From a single real job (app image, amd64): before prune -> Tota...
X Description: The problem The layer-cache cap is enforced against buildctl du, and on the busiest disk that number no longer describes the disk. From a single real job (app image, amd64): before prune -> ...
Opengraph URL: https://github.com/simstudioai/sim/pull/7521
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:45906c36-1d9d-a0f3-638b-afcf77df6e33 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E166:3988A1:1A72051:240209A:6AFB9128 |
| html-safe-nonce | 4790a2dba09daf95fc6b464fe78ac5f37a81c42928eb3d241f54cf139a0ccde0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTY2OjM5ODhBMToxQTcyMDUxOjI0MDIwOUE6NkFGQjkxMjgiLCJ2aXNpdG9yX2lkIjoiMTk1MjkwNjEwNDk3OTI5NjU1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5b0bea61930d26f530bc49eb3bc407d7d69a5b23e47e760fc4cd8d3da97642cd |
| hovercard-subject-tag | pull_request:4451965771 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/7521/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | The problem The layer-cache cap is enforced against buildctl du, and on the busiest disk that number no longer describes the disk. From a single real job (app image, amd64): before prune -> Tota... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4f01efe06174a5ba6342fd58e42d02295e0675bedbb465d6bef2dbaec8e46556 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a52db8866b6543b4e83730cd6a6b1360f1a9e4dc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width