Skip to main content
Rollback restores a VDE to a prior finalized state by rebinding its refs to a stored checkpoint.

Checkpoints

Checkpoints are created automatically when a VDE reaches finalized status:
  • After a whole build where all models match expected versions
  • After a whole promotion where the target VDE is finalized
Each checkpoint stores the complete set of model refs and function refs for that VDE at that point in time. Checkpoints are retained according to [janitor] max_checkpoints (default: 20).

Basic rollback

Restore the previous finalized checkpoint for the default VDE:
For an explicit VDE:

Explicit checkpoint

Restore a specific checkpoint:
Use sqb state checkpoints list to see available checkpoints.

What happens during rollback

  1. Target VDE lock is acquired
  2. The target checkpoint is located (previous finalized by default, or explicit id)
  3. Checkpoint physical relations are validated to still exist in the warehouse
  4. VDE refs are replaced with the checkpoint’s ref set
  5. VDE function refs are replaced with the checkpoint’s function ref set
  6. Logical VDE views are refreshed to point at the restored physical versions
  7. Function definitions are republished from the checkpoint’s function versions
  8. Target VDE lock is released

Partial rollback

Roll back a subset of models with --select:
Rolling back some models but not others can leave the VDE with stale models - models whose restored versions no longer line up with the rest of the VDE. When this happens, rollback is blocked by default so you don’t leave the VDE in a working state by accident. To accept a working VDE, pass --allow-partial-rollback:
The VDE is marked 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

Checkpoint inspection

List checkpoints for a VDE:
Show a checkpoint’s model refs:
Diff current VDE refs against a checkpoint: