Expand description
Durable operations records and their state-machine guard.
Structs§
Enums§
Constants§
- DEPLOY_
EXPIRY_ DAYS - Open deployment runs older than this many days are cancelled, so a push nobody approved does not stay open forever.
- DEPLOY_
KIND - The kind of a run that follows one file being sent to a node.
- DEPLOY_
MAX_ ATTEMPTS - Failed applies of the same bytes before the run stops retrying and fails.
Functions§
- acquire_
lease - add_
schedule - can_
transition - complete_
schedule_ occurrence - Records the run and advances the due time atomically, avoiding replay after a process stops between those otherwise separate writes.
- complete_
schedule_ occurrence_ fenced - create_
run - create_
run_ fenced - create_
run_ with_ kind - Creates a manual or scheduled run with an explicit operation kind. A schedule remains authoritative when present; the explicit kind is used only for manually-triggered operations such as a restore drill.
- deploy_
dispatch - A push of
sha256totargeton a node is held for a person (held) or has just been sent. Returns the run’s id. The same bytes reuse the open run; other bytes for the same target supersede it. Sending moves the run toRunningand its one step todispatching. - deploy_
observed - The node says which bytes
targetholds now. A run for exactly those bytes succeeded even if its result never arrived (a lock, a crash, a lost reply); the interrupted step is settled here. - deploy_
result - The node reported how applying
sha256went. A success ends the run; a failure leaves it inRetryWaituntilDEPLOY_MAX_ATTEMPTSsends have failed, then fails it. A result for bytes no run is following (a push from before runs existed) is ignored. - get_run
- get_
schedule - holder
- init_
schema - list_
runs - list_
schedules - mark_
interrupted - plugin_
provenance - The plugin hashes recorded for a run, empty when it used no plugin.
- record_
plugin_ provenance - Records which plugin programs a run used, as
{ "<plugin>": "<sha256 of the program>" }(R14). The hash is the install-time provenance re-checked at start, so a run row says which build of a plugin did the work even after the plugin is upgraded or removed. A second call for the same plugin replaces its hash; other plugins are kept. - transition_
run - transition_
run_ fenced - Refuses a mutation from an executor whose lease has been superseded.
- update_
schedule_ due