Repository navigation
ci(deploy-web): cache-bust /build.json — dev and preview are behind CloudFront (#1051) - #1079
Merged
Merged
Conversation
…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]>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second follow-up to #1077, from #1078's merge run.
What #1078's merge run showed
Run 38410783002:
scf-scaffald--d4molun8fn.expo.app/build.json=c37da273e, right after uploaddev.scaffald.com/build.jsonreturned5dfbe88f4for the full 6 minutesNot lag.
dev.scaffald.comis behind CloudFront:dev.scaffald.com/build.json5dfbe88f4(old)dev.scaffald.com/build.json?x=…c37da273escf-scaffald--dev.expo.app/build.jsonc37da273eEAS sends
cache-control: public, max-age=3600on static files, so CloudFront answers/build.jsonfrom 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.shfetch/build.json?v=<sha>-<random>. The query is CloudFront's cache key, and EAS ignores it. #1077 removed the cache-buster because localexpo serve404s 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.comand the EAS alias both returnc37da273e. The YAML parses, and the script passesbash -n.The 6-minute alias wait from #1078 stays. It's harmless now, and real alias lag did happen once.
🤖 Generated with Claude Code