Skip to main content

Module launch_identity

Module launch_identity 

Source
Expand description

What a new launch may do with its execution id (issue #229).

A launch with an explicit --session-id that is already tracked used to replace the record and truncate the log. It is now refused unless --append-attempt is given, which keeps the record, archives the previous attempt into attemptHistory, and appends the new attempt to the same log after a lifecycle header (the layout --resume already writes).

Two cases keep the earlier behaviour:

  • the next level of a stacked isolation, which receives the same --session-id from its parent and runs with START_EXECUTION_ID already set to it (is_nested_launch_of);
  • a generated UUID, which cannot collide.

Structs§

LaunchPlan
How a launch uses its execution id, decided before anything is printed.
PreflightParams
Inputs of preflight_launch.

Enums§

ClaimError
Why saving a launch failed.

Functions§

already_exists_message
apply_launch
Apply the preflight to the record a launch built: the continued UUID and, for --append-attempt, the identity and history of the stored execution.
claim_launch
Persist the launch’s record, refusing if another launch claimed the id in the meantime: a new id must still be free, an appended attempt must still follow the attempt the preflight saw.
count_logged_attempts
Attempts already in a log written without tracking, from its headers.
direct_execution_env
START_* variables of a run without a backend session (direct, or --isolated-user alone): the session name is empty.
is_execution_live
True while the stored execution may still be running.
isolated_user_command
Command of an --isolated-user run without a backend: sudo resets the environment, so the variables are exported by the command itself.
launch_log_content
Header a launch writes into its log: unchanged for a fresh log; for an appended attempt, preceded by a lifecycle line in the format --resume writes, so the attempts stay apart.
merge_appended_attempt
Turn the record a launch built into the next attempt of previous, keeping the identity, history and log of the execution.
preflight_launch
Decide how a launch uses its execution id; Err when it must not run.
prepare_launch
Preflight of the CLI: how this launch uses its id (#229) and which execution it continues (#231).
write_launch_log
Write the launch header: a fresh log, or, for an appended attempt, a lifecycle line and the header after the earlier attempts.