Skip to main content

Module promote

Module promote 

Source
Expand description

Promote command - promote staging deployment to production via ALTER SWAP.

StructsΒ§

ClusterSwapView πŸ”’
DeploymentPlan πŸ”’
Central data structure holding everything needed to display and execute a deployment.
ReplacementMvView πŸ”’
ResourceToDropView πŸ”’
SchemaSwapView πŸ”’
SinkToCreateView πŸ”’
SinkToRepointView πŸ”’

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_AT environment variable matches phase, 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.