assigner: the state composition-runs, one key per candidate and machine (A1)

A composition run is kept once per candidate and machine, so steps of one candidate share
it: the key is written create-only, a reader is the step's StepRun with its ask id, a run
that could not run is replaced, a run past composition-runs-kept goes at the next start,
and at the cap no run starts, naming the fill. The settings reach the process through
resource files.

Builds: design 47 G §718, §719, §720 (could not run is never read); A-468, A-468b, A-468c, A-469d, A-469w, A-469x, A-470
This commit is contained in:
2026-11-17 11:26:51 +01:00
parent 8fa1b8aee7
commit ef5e5d13e0
9 changed files with 799 additions and 23 deletions
+81 -1
View File
@@ -158,6 +158,7 @@
{ "name": "delivery-waits", "history": 1 },
{ "name": "delivered-again", "history": 1 },
{ "name": "inputs", "history": 1, "max-mib": 64 },
{ "name": "composition-runs", "history": 1, "key-ttl": true, "max-mib": 64 },
{ "name": "pins", "history": 5, "max-mib": 4 }
],
"config": {
@@ -182,6 +183,40 @@
"description": "the change kinds of a proposal the assigner asks the operator before it writes it, separated by commas: place, take-off, pin, unpin, hold, unhold, decide, config, add-node, remove-node, and stops for a verdict whose answers say a node would stop running a module (design 47 G A-425, A-425a). A proposal none of whose changes is of a kind named is applied at once when its verdict passes, said in the log and by assignments-changed. The default is take-off,remove-node,stops; empty asks for nothing.",
"trusted": false,
"default": "take-off,remove-node,stops"
},
"composition-runs-cap-mib": {
"type": "number",
"description": "the cap of the state composition-runs in MiB, the process refusing a new composition run at it with its steps ending could not run naming the fill (design 47 G section 719, A-469d); its maximum is the manifest's max-mib.",
"minimum": 1,
"maximum": 64,
"trusted": false,
"default": 16
},
"composition-runs-kept": {
"type": "string",
"description": "how long a composition run's key is kept after it ended, a Go duration such as 24h (design 47 G section 719, A-469x).",
"trusted": false,
"default": "24h"
},
"composition-step-bound": {
"type": "string",
"description": "how long a taken composition run's ask may go without saying its progress before the run ends could not run, a Go duration such as 30m; written again at each step-progress (design 47 G section 720, A-469x).",
"trusted": false,
"default": "30m"
},
"run-untaken-bound": {
"type": "string",
"description": "how long a composition run's ask may wait for a build node to take it before the run ends could not run, a Go duration such as 24h (design 47 G section 720, A-466s, A-469x).",
"trusted": false,
"default": "24h"
},
"blame-tries": {
"type": "number",
"description": "the most compositions a machine's composer makes to find the modules it blames, carried in the run's request as blame_tries (design 47 G section 721, A-466r).",
"minimum": 1,
"maximum": 1000,
"trusted": false,
"default": 20
}
},
"objects": [
@@ -231,6 +266,46 @@
"mode": "0600",
"content": "${config:ask-operator-for}"
},
{
"id": "composition-runs-cap-mib",
"type": "file",
"path": "${dir:state}/composition-runs-cap-mib",
"owner": "mesh-delivery-assigner",
"mode": "0600",
"content": "${config:composition-runs-cap-mib}"
},
{
"id": "composition-runs-kept",
"type": "file",
"path": "${dir:state}/composition-runs-kept",
"owner": "mesh-delivery-assigner",
"mode": "0600",
"content": "${config:composition-runs-kept}"
},
{
"id": "composition-step-bound",
"type": "file",
"path": "${dir:state}/composition-step-bound",
"owner": "mesh-delivery-assigner",
"mode": "0600",
"content": "${config:composition-step-bound}"
},
{
"id": "run-untaken-bound",
"type": "file",
"path": "${dir:state}/run-untaken-bound",
"owner": "mesh-delivery-assigner",
"mode": "0600",
"content": "${config:run-untaken-bound}"
},
{
"id": "blame-tries",
"type": "file",
"path": "${dir:state}/blame-tries",
"owner": "mesh-delivery-assigner",
"mode": "0600",
"content": "${config:blame-tries}"
},
{
"id": "assigner",
"type": "process",
@@ -243,7 +318,12 @@
"MESH_BROKER_FILE": "${dir:state}/broker",
"MESH_ASSIGNER_OUTSIDE_WAIT_FILE": "${dir:state}/outside-wait-minutes",
"MESH_ASSIGNER_OUTSIDE_SETTLE_FILE": "${dir:state}/outside-settle-seconds",
"MESH_ASSIGNER_ASK_OPERATOR_FOR_FILE": "${dir:state}/ask-operator-for"
"MESH_ASSIGNER_ASK_OPERATOR_FOR_FILE": "${dir:state}/ask-operator-for",
"MESH_ASSIGNER_COMPOSITION_RUNS_CAP_MIB_FILE": "${dir:state}/composition-runs-cap-mib",
"MESH_ASSIGNER_COMPOSITION_RUNS_KEPT_FILE": "${dir:state}/composition-runs-kept",
"MESH_ASSIGNER_COMPOSITION_STEP_BOUND_FILE": "${dir:state}/composition-step-bound",
"MESH_ASSIGNER_RUN_UNTAKEN_BOUND_FILE": "${dir:state}/run-untaken-bound",
"MESH_ASSIGNER_BLAME_TRIES_FILE": "${dir:state}/blame-tries"
},
"user": "mesh-delivery-assigner",
"health": {