Checkpoints
Checkpoints are created automatically when a VDE reachesfinalized status:
- After a whole build where all models match expected versions
- After a whole promotion where the target VDE is finalized
[janitor] max_checkpoints (default: 20).
Basic rollback
Restore the previous finalized checkpoint for the default VDE:Explicit checkpoint
Restore a specific checkpoint:sqb state checkpoints list to see available checkpoints.
What happens during rollback
- Target VDE lock is acquired
- The target checkpoint is located (previous finalized by default, or explicit id)
- Checkpoint physical relations are validated to still exist in the warehouse
- VDE refs are replaced with the checkpoint’s ref set
- VDE function refs are replaced with the checkpoint’s function ref set
- Logical VDE views are refreshed to point at the restored physical versions
- Function definitions are republished from the checkpoint’s function versions
- Target VDE lock is released
Partial rollback
Roll back a subset of models with--select:
--allow-partial-rollback:
working after the rollback. You can finalize it later by building or rolling back the remaining models.
If the models you select depend on upstream models that also need to be restored for the scope to be coherent, pass --include-stale-upstreams to expand the selection to the minimal set of required upstream refs from the checkpoint:
Guards
| Condition | Behavior |
|---|---|
| No previous checkpoint exists | Blocks. Build the VDE first to create a finalized checkpoint. |
| Checkpoint physical relations deleted | Blocks. The physical version tables have been cleaned up by janitor. Use a more recent checkpoint or rebuild. |
| Unknown checkpoint id | Blocks with error. |
| Target VDE is locked | Blocks. Wait or clear the lock. |
| Target VDE is detached | Blocks. Detached VDEs cannot be rolled back. |
| Partial rollback leaves VDE working | Blocks unless --allow-partial-rollback is set. |

