Skip to main content

run

Function run 

Source
pub async fn run(
    settings: &Settings,
    stage_name: Option<&str>,
    allow_dirty: bool,
    no_rollback: bool,
    dry_run: bool,
) -> Result<(), CliError>
Expand description

Deploy the project to a staging environment.

Creates renamed schemas and clusters alongside production, deploys the project onto them, and records metadata so a later apply can atomically swap staging into production.

§Arguments

  • settings - Resolved CLI settings (project directory, profile, etc.)
  • stage_name - Optional environment name; defaults to a git-derived or random identifier
  • allow_dirty - Allow deploying with uncommitted changes
  • no_rollback - Skip automatic rollback on failure (for debugging)
  • dry_run - Print SQL instead of executing it

§Returns

Ok(()) if the deployment succeeds.

§Errors

Surfaces CliError variants from git checks, project compilation, and database execution.