Skip to main content

run_migration_upgrade

Function run_migration_upgrade 

Source
pub async fn run_migration_upgrade(
    launcher_exe_dir: &Path,
    paths: &DataPaths,
    srv_child: &mut Child,
    srv_stdin: Option<ChildStdin>,
    sink: &StartupEventSink,
) -> Result<(), UpgradeError>
Expand description

Quiesce the running srv, then run pending migrations via the agentmux-srv migrate subprocess. Does NOT relaunch srv afterward and does NOT install a staged app update first — both are the caller’s responsibility once one exists (§4.2’s boot gate for the former; app-update-check.md’s still-unimplemented install_update for the latter, per the spec’s §5.4 ordering — a staged update must be installed BEFORE this runs, so its migrations are the ones that end up applied).

srv_child must be the handle for the ALREADY-RUNNING srv this upgrade is replacing — this function does not spawn or discover it — and srv_stdin its stdin keepalive (see quiesce_srv).