René's URL Explorer Experiment


Title: perf(ci): scope the Docker layer cache per image and platform by waleedlatif1 · Pull Request #6501 · simstudioai/sim · GitHub

Open Graph Title: perf(ci): scope the Docker layer cache per image and platform by waleedlatif1 · Pull Request #6501 · simstudioai/sim

X Title: perf(ci): scope the Docker layer cache per image and platform by waleedlatif1 · Pull Request #6501 · simstudioai/sim

Description: app.Dockerfile's deps stage rebuilds on every build (~300-465s, the longest step in CI) even when no dependency changed. The cause is not the Dockerfile: it is that setup-docker-builder@v1 keys the Blacksmith sticky disk on the repository name alone (stickyDiskKey = GITHUB_REPO_NAME), so every Docker build in the repo shares one disk. What that means in practice, from the job logs: all five matrix jobs clone the same parent snapshot (Sticky disk parent snapshot: commit-01KZP43K…, byte-identical across the app/db/realtime/pii/cron jobs of run 31416995583), and at most one commit per wave becomes the next parent. Matching the 11 snapshot heads minted over 08-07/08-08 against job completion times, 9 of them landed within 2-4s of the fastest job finishing (pii, ~23s; cron, ~18s) and only 2 came from an app build. It is first-writer-wins against the parent generation, not last-writer-wins, which is exactly why the app build (637-919s) essentially never survives. Run 31416995583 cloned a head minted at 15:19:23 by a pii job, discarding the app builds that finished at 15:29, 15:59, 16:37 and 17:41 in between. The fix derives a distinct cache-key per Dockerfile per platform and moves to setup-docker-builder@v2, where cache-key exists as a required input: - name: Resolve Docker layer cache key id: cache-key if: inputs.provider == '' || inputs.provider == 'blacksmith' shell: bash env: FILE: ${{ inputs.file }} PLATFORMS: ${{ inputs.platforms }} run: echo "value=${GITHUB_REPOSITORY##*/}/${FILE#./}/${PLATFORMS//\//-}" >> "$GITHUB_OUTPUT" - name: Set up Blacksmith builder if: inputs.provider == '' || inputs.provider == 'blacksmith' uses: useblacksmith/setup-docker-builder@a5256a73e30f09e37e3eceb8ca36043d17621d24 # v2 with: cache-key: ${{ steps.cache-key.outputs.value }} That yields sim/docker/app.Dockerfile/linux-amd64, sim/docker/db.Dockerfile/linux-amd64, sim/docker/app.Dockerfile/linux-arm64, and so on: ten keys, one per concurrent builder, so no two jobs that run at the same time ever contend for the same snapshot lineage again. Computing it inside the composite means all three call sites (build-dev, build-amd64, build-ghcr-arm64) are covered with no caller changes and no way for a new call site to drift. Platform is part of the key deliberately. On main, build-amd64 and build-ghcr-arm64 build the same Dockerfiles concurrently; keying only by Dockerfile would reproduce the identical clobbering between them, and amd64/arm64 share no layers, so splitting costs nothing. The deps layer is genuinely cacheable, which is what makes this worth fixing: re-running turbo prune sim --docker at both reference commits (156ee3eb -> 5da48d01) produces byte-identical out/json and bun.lock, so the only reason #11 COPY --from=pruner /app/out/json/ ./ misses is that the previous app build's records are not in the snapshot this build cloned. Nothing was evicting, so this is not a pruning problem: the teardown log reports Skipping BuildKit cache pruning (max-cache-size-mb not set) with 91.77 GB retained and fully reclaimable, including five separate ~2.8 GB deps layers from five earlier app builds, each with USAGE COUNT 1. max-cache-size-mb no longer exists on v2; the cache is garbage-collected automatically (layers unused for 8 days). Worth watching separately: org sticky disk usage is currently 942 GB against a 500 GB allowance. The first build on each new key is cold, and there are ten of them. Everything after that hits a cache that only its own image writes to. The other Blacksmith runners on blacksmith-* labels and the docker/* fallback path for CI_PROVIDER != blacksmith are untouched; the new step carries the same predicate as the builder step it feeds.

Open Graph Description: app.Dockerfile's deps stage rebuilds on every build (~300-465s, the longest step in CI) even when no dependency changed. The cause is not the Dockerfile: it is that setup-docker-builder@v1 keys...

X Description: app.Dockerfile's deps stage rebuilds on every build (~300-465s, the longest step in CI) even when no dependency changed. The cause is not the Dockerfile: it is that setup-docker-builder@v1 ...

Opengraph URL: https://github.com/simstudioai/sim/pull/6501

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:1bb4c210-f0eb-ba92-a8ef-ebfb21c4b3e3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA328:3A88AC:6476AE:8F9DB9:6AFB42BB
html-safe-nonce8161cec11ad2766cebee29357ab6b7e9f067cd52167beece1a10b1a1fbbc09b3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzI4OjNBODhBQzo2NDc2QUU6OEY5REI5OjZBRkI0MkJCIiwidmlzaXRvcl9pZCI6IjE5NTM1NjAzMzU4NzI2Mzk2NzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1dec7697dc3afb64365d519e27444f9e51bfdd9da93d12a08a1dc1ab8a4d013b
hovercard-subject-tagpull_request:4247916448
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6501/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altapp.Dockerfile's deps stage rebuilds on every build (~300-465s, the longest step in CI) even when no dependency changed. The cause is not the Dockerfile: it is that setup-docker-builder@v1 keys...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6501/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6501%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6501%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6501/files
Reloadhttps://github.com/simstudioai/sim/pull/6501/files
Reloadhttps://github.com/simstudioai/sim/pull/6501/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
perf/docker-layer-cache-per-image-keyshttps://github.com/simstudioai/sim/tree/perf/docker-layer-cache-per-image-keys
Conversation 11 https://github.com/simstudioai/sim/pull/6501
Commits 1 https://github.com/simstudioai/sim/pull/6501/commits
Checks 30 https://github.com/simstudioai/sim/pull/6501/checks
Files changed https://github.com/simstudioai/sim/pull/6501/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6501/files
perf(ci): scope the Docker layer cache per image and platform https://github.com/simstudioai/sim/pull/6501/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/6501/files
141ffac perf(ci): scope the Docker layer cache per image and platform waleedlatif1 Aug 10, 2026 https://github.com/simstudioai/sim/pull/6501/commits/141ffac036a8dacd740a509367f57796eac449e2
Clear filters https://github.com/simstudioai/sim/pull/6501/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6501/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6501/files
.github/actions/docker-build/action.ymlhttps://github.com/simstudioai/sim/pull/6501/files#diff-f1d084efa26a0f0f45c8ba872e6dc750a73daca60a47dfa42121b28eda7e32b3
View file https://github.com/simstudioai/sim/blob/141ffac036a8dacd740a509367f57796eac449e2/.github/actions/docker-build/action.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6501/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6501/files#diff-f1d084efa26a0f0f45c8ba872e6dc750a73daca60a47dfa42121b28eda7e32b3
Please reload this pagehttps://github.com/simstudioai/sim/pull/6501/files
https://github.com/simstudioai/sim/pull/6501/files#diff-f1d084efa26a0f0f45c8ba872e6dc750a73daca60a47dfa42121b28eda7e32b3
Please reload this pagehttps://github.com/simstudioai/sim/pull/6501/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.