Skip to content

ci(deploy-web): check the deployment's own URL first, then give the alias six minutes (#1051) - #1078

Merged
thinkclay merged 1 commit into
mainfrom
ci/deploy-web-check-deploy-url
Oct 13, 2026
Merged

thinkclay merged 1 commit into
mainfrom
ci/deploy-web-check-deploy-url

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Follow-up to #1077, from its first real run.

What happened: run 37813067368 built and deployed 5dfbe88f4 correctly, and the head guard passed. Then the new 🔖 Deployed build is this commit step failed: for 2 minutes, dev.scaffald.com/build.json came from the previous deployment, which has no stamp. The dev alias took more than 2 minutes to move. Shortly afterwards dev served {"commit":"5dfbe88f4…"}, and the per-deploy URL in that run's log (scf-scaffald--d9pnnihhtt.expo.app) serves the right stamp.

So the check found something real (alias lag), but it treated lag as a wrong build.

Change

  1. The deploy step tees eas deploy output and extracts the per-deploy URL. The alias URL --<alias>.expo.app also appears in that output, and is excluded. The step runs with shell: bash, so the tee keeps pipefail.
  2. The check reads /build.json from that URL first. That's the deployment itself, correct immediately, and the check fails if it doesn't carry this SHA.
  3. Then it polls the alias for up to 6 minutes, logging how long it took. It still accepts the newer branch head, and still fails otherwise.

Tested: the extraction picks --d9pnnihhtt and not --dev from a log containing both. The YAML parses. The proof is this PR's own merge run, which I'll check.

Refs #1051.

🤖 Generated with Claude Code

…lias six minutes (#1051)

The first real run of #1077's commit check (37813067368) failed while the
deploy was correct: the dev alias took over two minutes to move to the new
deployment, so /build.json kept 404ing from the previous one. dev served
the new stamp shortly after.

The check now reads /build.json from the per-deploy URL in the eas deploy
output (the deployment itself, correct at once; the alias URL is excluded)
and fails if that is wrong; then polls the alias for up to 6 minutes,
reporting how long it took. The deploy step runs with shell: bash so the
tee keeps pipefail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thinkclay
thinkclay merged commit c37da27 into main Oct 13, 2026
10 checks passed
@thinkclay
thinkclay deleted the ci/deploy-web-check-deploy-url branch October 13, 2026 14:08
thinkclay added a commit that referenced this pull request Oct 13, 2026
…loudFront, not a bare CNAME (#1051) (#1079)

#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]>
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