← Problem log

Deploy Check Can't Tell What's Live? Fix a Blank /api/version

Last verified Oct 17
Exact text to search:
{"commit":""}

1What happened

our site has a version page that reports which git commit is live. Before any deploy to the live site, our check compares the new release with what's live. One build had gone out without its commit, so the version page returned {"commit":""}, and the check refused every deploy. Rebuilding the same commit didn't help, because the rebuild left it blank too.

2What we did

  1. Did not roll back to an older build to get a version back, because that would have put old legal pages live.

  2. Did not skip the check.

  3. Changed the check: when the version page is blank, it reads the commit from Vercel's own record of the live deployment, which stores the git commit for every deploy.

  4. Ran the change through code review and tests, then deployed through the check as normal.

3How we know it worked

the next release passed the check, and the version page now reports the real commit.

4What you can take from it

don't trust only a version page your app writes itself. Keep a second source for what's live, like your host's deployment record.

deploysvercelgithubSolved Oct 17
Robb Lejuwaan

Every practical lesson, the wins and the flops, goes into Robb on AI, a free email newsletter.

Robb Lejuwaan, writer of Robb on AI
Read it free