Expand description
Promote command - promote staging deployment to production via ALTER SWAP.
StructsΒ§
- Cluster
Swap πView - Deployment
Plan π - Central data structure holding everything needed to display and execute a deployment.
- Replacement
MvView π - Resource
ToDrop πView - Schema
Swap πView - Sink
ToCreate πView - Sink
ToRepoint πView
FunctionsΒ§
- apply_
replacement_ πmvs - Apply replacement materialized views using data from the plan.
- cleanup_
apply_ πstate - Removes deployment bookkeeping that is only needed while apply is in-flight.
- drop_
old_ πresources - Drop old production resources after the swap.
- execute_
atomic_ πswap - Execute the atomic swap of schemas, clusters, and state schemas.
- execute_
pending_ πsinks - Execute pending sink statements using data from the plan.
- execute_
swap_ πphase - Runs the swap portion of apply according to persisted resume state.
- gather_
resources_ πand_ check_ conflicts - Gather staging resources and check for deployment conflicts.
- generate_
deployment_ πplan - Build a complete deployment plan by querying the database once for all data.
- maybe_
crash π - Test-only crash injection. When the
MZ_DEPLOY_FAIL_ATenvironment variable matchesphase, abort the process immediately β no unwinding, no cleanup β to faithfully simulate a crash at that boundary so promoteβs resume paths can be exercised end to end. Inert in normal use (the variable is never set). - repoint_
dependent_ πsinks - Repoint sinks that depend on objects in schemas about to be dropped.
- run
- Promote a staging deployment to production using ALTER SWAP.
- run_
post_ πswap_ steps - Completes promotion work that must happen after schemas/clusters are swapped.
- strip_
staging_ πsuffix - Recover a production name from a staging name by removing the staging suffix.