Runbook — Upgrade a RepoWrangler deployment
Releases are tagged vMAJOR.MINOR.PATCH on main. Migrations are immutable once released; new schema arrives only as new migration files, so upgrading is always forward-only.
Steps
Read the release notes (
CHANGELOG.md) for the target version — especially new secrets/vars and new migrations.Pull the release:
bashgit fetch --tags && git checkout vX.Y.Z pnpm installApply new migrations (safe to run when there are none):
bashwrangler d1 migrations apply repo-wrangler --remoteSet any new secrets/vars called out in the changelog (
wrangler secret put NAME, or vars inwrangler.jsonc).Verify locally, then deploy:
bashpnpm typecheck && pnpm test && pnpm build wrangler deployPost-deploy checks:
GET /health/livereports the new version;GET /health/readyisok: true; Platform Health shows connectionsactiveand no failed-job spike on the next sync ticks.
Rollback
Redeploy the previous tag (git checkout vPREV && pnpm build && wrangler deploy). Migrations are not rolled back — releases must tolerate a newer schema than they created, which the compatibility policy guarantees for one minor version. If a migration itself misbehaved, restore per recover-d1.md.