The states of an update
State Diagram from the Technical Manual.
Text version
- Start
- check('scheduled') or check('requested'): Checking
- Checking
- Staged
- guard of another version points app at the record’s version, exit 3: Staged
- update guard switchTo() (snapshot db and _db, check out the app commit, move node_modules, attempts = 1): Started
- switchTo() throws: RolledBack
- Started
- home page healthy, confirm() (history.jsonl, delete pending, prune): Confirmed
- start fails (exit 99, or SIGKILL at the start deadline), guard adds 1 to attempts: Started
- attempts ≥ MAX_FAILED_STARTS (2) or record for another version: RolledBack
- RolledBack
- Confirmed
- End