Title: fix(ci): treat an unreadable cache size as unstable when settling by waleedlatif1 · Pull Request #7274 · simstudioai/sim · GitHub
Open Graph Title: fix(ci): treat an unreadable cache size as unstable when settling by waleedlatif1 · Pull Request #7274 · simstudioai/sim
X Title: fix(ci): treat an unreadable cache size as unstable when settling by waleedlatif1 · Pull Request #7274 · simstudioai/sim
Description: Summary cubic flagged this on #7273 and it's correct. Verified rather than taken on trust. The settle loop initialises prev='', and since 4795d0426f made total() return empty on failure, two consecutive failed buildctl du reads compare equal and trip the stability counter: du always failing -> loop exited after 2 iterations (of a possible 60) So the loop gives up after ~2s instead of its 120s bound — precisely when du is failing and the prune is most likely still deleting, which is the exact case the wait exists to cover. Handing back early there risks the builder post-step SIGKILLing buildkitd and skipping the sticky disk commit. Why guarding on non-empty is the right fix, with no downside An empty reading can only mean du failed. buildctl prints its Total: line unconditionally — cmd/buildctl/diskusage.go:161, outside any branch: fmt.Fprintf(tw, "Reclaimable:\t%.2f\n", units.Bytes(reclaimable)) fmt.Fprintf(tw, "Total:\t%.2f\n", units.Bytes(total)) So a genuinely empty cache still reports Total: 0B and settles normally. There's no risk of adding 120s to builds with a cold cache — which was the obvious objection to this fix. Confirmed across all three paths: du behaviour iterations before exit always fails 60 (waits the full bound) steady value 3 empty cache (Total: 0B) 3 Severity Lower than P1 in practice: since #7252 the step can't fail a build, so the consequence is a possibly-skipped disk commit — one run's cache lost, not a red build. But the logic is plainly wrong and the fix is one condition, so it's worth taking before promotion. Type of Change Bug fix Testing Reproduced the early exit and verified the fix under the exact shell flags GitHub uses (bash -e -o pipefail), across failing / steady / empty-cache readings. shellcheck clean, actionlint unchanged from baseline (13 pre-existing), bun run lint and all 39 check:audits pass. 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: Summary cubic flagged this on #7273 and it's correct. Verified rather than taken on trust. The settle loop initialises prev='', and since 4795d0426f made total() return empty on failure...
X Description: Summary cubic flagged this on #7273 and it's correct. Verified rather than taken on trust. The settle loop initialises prev='', and since 4795d0426f made total() return empt...
Opengraph URL: https://github.com/simstudioai/sim/pull/7274
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d57a05ec-7dec-10cc-52a4-4eecce4891e6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AB1E:2FF5E0:1CF63F2:2737B13:6AFB99D1 |
| html-safe-nonce | 4e0914a2d68d17f574ed38819737e5d1d59af5383dbd9ee3f6d8806bfe67184e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjFFOjJGRjVFMDoxQ0Y2M0YyOjI3MzdCMTM6NkFGQjk5RDEiLCJ2aXNpdG9yX2lkIjoiNjQ5NjMxMzY5MjU2NzM0NTYxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a873f40ed086666c9ffe18916f728f9bae0bc9ac99ac9139882e2ea55d68f7e |
| hovercard-subject-tag | pull_request:4390521949 |
| 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/7274/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 | Summary cubic flagged this on #7273 and it's correct. Verified rather than taken on trust. The settle loop initialises prev='', and since 4795d0426f made total() return empty on failure... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1 |
| 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 | 606800bdb1b81d125fc845bdcc262c9fe063fc8f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width