Skip to main content

Module prepare

Module prepare 

Source
Expand description

Operator-side cloud prepare (§4): shallow git checkout + run a command on the operator’s machine. Cloud substrates call this and map the neutral PrepareFailure to their own PrepareFailed-style fault.

Structs§

PrepareFailure
A prepare step that failed, as neutral data the provider maps to its own fault (preserving per-provider error codes and remediation).
PreparePlan
A resolved prepare step: the command, the pinned source, and the fully interpolated env it runs with. resolve_prepare_env returns None when the service declares no prepare hook.

Functions§

resolve_prepare_env
Resolve a service’s prepare env against namespace and inject same-named secrets. The caller builds the namespace — substrates differ in what it carries (only Render exports the external-DB url) — so this stays pure and substrate-agnostic. Any failure is the neutral PrepareFailure.
run_prepare_command
Shallow-clone repo@reference into a temp dir, run command there with env, and clean up. Any failure is returned as a PrepareFailure.
run_service_prepare
Resolve and run a service’s prepare hook on the operator’s machine. A no-op when the service declares no prepare. The caller maps the neutral PrepareFailure to its own fault.