Auto-update with safe update and automatic rollback (to grill) #684

Open
opened 2026-10-26 11:23:01 +00:00 by kayg · 0 comments
Owner

kayg (26 Oct): auto-update, plus resilience in both the update and the automatic rollback, needs its own issue to refine. Not to be built until it has been grilled.

Today

  • No releases. kayg deploys by hand from dev once it's considered stable (TARGET=cloud deploy/next/deploy.sh on the build VM).
  • remote.sh already: tags the old image :rollback, snapshots data, starts the new build, waits up to 60 s for /healthz, and rolls back on its own if that fails. Manual rollback: deploy/next/rollback.sh (--data restores the snapshot).
  • Earlier proposal: PR #537 "ADR: auto-update and auto-rollback (proposed)".

Questions to grill before any work

  • What triggers an update: a manual "deploy" action, a tag, or a dev head that someone marks stable?
  • Push (build box → SSH → prod) or pull (prod pulls an image from the Forgejo registry)?
  • What counts as healthy: /healthz only, or a smoke test (sign-in, open a note, save), error rate, or memory over N minutes?
  • Rollback when data migrations have run: are migrations always backward compatible, or does a rollback restore the snapshot? What about writes made after the deploy?
  • What happens when a deploy is interrupted (power, OOM, a full disk mid-load)?
  • Notifications: where kayg hears about a deploy or rollback.
  • Clients: how open tabs and PWAs learn there's a new build, and how they reload without losing unsaved edits.
kayg (26 Oct): auto-update, plus resilience in both the update and the automatic rollback, needs its own issue to refine. Not to be built until it has been grilled. ## Today - No releases. kayg deploys by hand from `dev` once it's considered stable (`TARGET=cloud deploy/next/deploy.sh` on the build VM). - `remote.sh` already: tags the old image `:rollback`, snapshots data, starts the new build, waits up to 60 s for `/healthz`, and rolls back on its own if that fails. Manual rollback: `deploy/next/rollback.sh` (`--data` restores the snapshot). - Earlier proposal: PR #537 "ADR: auto-update and auto-rollback (proposed)". ## Questions to grill before any work - What triggers an update: a manual "deploy" action, a tag, or a dev head that someone marks stable? - Push (build box → SSH → prod) or pull (prod pulls an image from the Forgejo registry)? - What counts as healthy: `/healthz` only, or a smoke test (sign-in, open a note, save), error rate, or memory over N minutes? - Rollback when data migrations have run: are migrations always backward compatible, or does a rollback restore the snapshot? What about writes made after the deploy? - What happens when a deploy is interrupted (power, OOM, a full disk mid-load)? - Notifications: where kayg hears about a deploy or rollback. - Clients: how open tabs and PWAs learn there's a new build, and how they reload without losing unsaved edits.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#684
No description provided.