Skip to content

ci(deploy-web): cache-bust /build.json — dev and preview are behind CloudFront (#1051) - #1079

Merged
thinkclay merged 1 commit into
mainfrom
ci/build-json-cache-bust
Oct 13, 2026
Merged

thinkclay merged 1 commit into
mainfrom
ci/build-json-cache-bust

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Second follow-up to #1077, from #1078's merge run.

What #1078's merge run showed

Run 38410783002:

Not lag. dev.scaffald.com is behind CloudFront:

request x-cache commit
dev.scaffald.com/build.json Hit from cloudfront, age 436 5dfbe88f4 (old)
dev.scaffald.com/build.json?x=… Miss from cloudfront c37da273e
scf-scaffald--dev.expo.app/build.json (EAS) c37da273e

EAS sends cache-control: public, max-age=3600 on static files, so CloudFront answers /build.json from the previous deploy for up to an hour. The workflow's comment that dev and preview "CNAME straight to EAS" was wrong.

Fix

Both the CI check and deploy-web-eas.sh fetch /build.json?v=<sha>-<random>. The query is CloudFront's cache key, and EAS ignores it. #1077 removed the cache-buster because local expo serve 404s any static file with a query string; the real hosts don't. The wrong comment is corrected.

Tested against the live hosts with exactly the check's curl | sed: dev.scaffald.com and the EAS alias both return c37da273e. The YAML parses, and the script passes bash -n.

The 6-minute alias wait from #1078 stays. It's harmless now, and real alias lag did happen once.

🤖 Generated with Claude Code

…loudFront, not a bare CNAME (#1051)

#1078's merge run (38410783002) deployed correctly — the per-deploy URL
check passed for c37da27 — then failed the alias wait: dev.scaffald.com
kept serving 5dfbe88's build.json for the whole 6 minutes. Not lag:
dev.scaffald.com is behind CloudFront (x-cache: Hit from cloudfront,
age 436) and EAS sends max-age=3600 for static files, so CloudFront held
the old /build.json for an hour. scf-scaffald--dev.expo.app had the new
one; dev.scaffald.com/build.json?x=… (a cache miss) did too.

The query string is CloudFront's cache key, so both the CI check and the
prod script now fetch /build.json?v=<sha>-<random>. #1077 dropped the
cache-buster because local expo serve 404s static files with a query; the
real hosts do not. The workflow comment claiming dev/preview CNAME straight
to EAS is corrected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thinkclay
thinkclay merged commit 5ffe661 into main Oct 13, 2026
10 checks passed
@thinkclay
thinkclay deleted the ci/build-json-cache-bust branch October 13, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant