← All posts
Postmortems
1 min read

Verify after propagation, not after push

A redirect was reported broken seconds after pushing. It simply was not live yet. How we check deploys now.


PaceStreak’s website has a short redirect, /twitter, that points at the project’s profile. After a push that added it, the redirect was checked straight away, did not work, and was reported as broken.

It was not broken. It was not deployed yet.

How deploys work here

Pushing to main deploys. The website and the blog are Git-connected Cloudflare Pages projects: a push triggers a build on Cloudflare, the build runs npm ci and the site’s build, and the result is published to the edge. There is no deploy workflow of our own and no API token in either repository.

That pipeline takes time: a queue, an install, a build, and then propagation across the edge. Checking a URL seconds after git push tests the previous deployment.

How we check now

Deployment history is readable without a token:

npx wrangler pages deployment list --project-name=pacestreak

The workflow is:

  1. Push.
  2. Watch the deployment list until the new commit appears and has finished.
  3. Then request the URL, bypassing any local cache.

Only a failure at step three is a bug.

Even after a deploy, some files can be served stale from Cloudflare’s cache. The available API token can only read the zone, not purge it, so a purge is a dashboard job. That is a known outstanding task, and it is another reason to confirm what the edge is actually serving before drawing conclusions.

The lesson

“It doesn’t work” and “it isn’t there yet” produce the same response. Tell them apart before reporting either.

AlzyWelzy

Building PaceStreak. GitHub

Related

  • Infrastructure

    One outage, four root causes

    The API went down behind a Cloudflare Tunnel error and stayed down through a reboot, an interrupted OS upgrade, a stale connection pool, and a box too small for its own workload. None of the four were the same bug.

    9 min
  • Infrastructure

    A status page that watches the whole stack, finally

    app and api had no DNS records for most of their existence, so there was nothing to monitor - which meant status.pacestreak.com kept quietly not telling the whole story even after both went live. Fixed, plus a lesson in why a 200 from the app proves nothing about the API behind it.

    2 min

Build the habit. Keep the week.

PaceStreak is a habit and streak tracker for training and everything else worth doing regularly.