motion: a want carries no composed digest, so a have at the wanted fingerprint is applied; the test copy of mesh-wants at C-W
Builds: design 47 H §750, H-A-37, H-A-78
This commit is contained in:
+4
-5
@@ -13,11 +13,10 @@ import "time"
|
||||
// findings while it is delivered there and raises what still stands when the delivery ends. Before, it lived in the view
|
||||
// alone (mesh-delivery-view internal/view motionOf), and a second reader would have judged a delivery its own way.
|
||||
|
||||
// Want is what the derivation reads of a module's want on a node: its fingerprint and composition, and whether it is removed.
|
||||
// Want is what the derivation reads of a module's want on a node: its fingerprint, and whether it is removed. A want carries no composed digest, so a have at the wanted fingerprint is the want applied (design 47 H, H-A-78).
|
||||
type Want struct {
|
||||
FP string
|
||||
Composed string
|
||||
Removed bool
|
||||
FP string
|
||||
Removed bool
|
||||
}
|
||||
|
||||
// Have is what it reads of the module's have on that node: the fingerprint and composition it runs, its phase and health
|
||||
@@ -90,7 +89,7 @@ func MotionOf(w Want, wanted bool, h Have, has bool, stuckWords string, stuck bo
|
||||
}
|
||||
m := Motion{Delivering: !has || h.FP != w.FP || h.Phase == PhaseApplying,
|
||||
Failed: has && (h.Phase == PhaseFailed || (h.FP == w.FP && h.Health == HealthFailed))}
|
||||
applied := has && h.FP == w.FP && (h.Composed == "" || h.Composed == w.Composed)
|
||||
applied := has && h.FP == w.FP
|
||||
switch {
|
||||
case applied && h.Phase == PhaseRunning && h.Health == HealthOK:
|
||||
m.State, m.Outcome = MotionSettled, OutcomeRunning
|
||||
|
||||
@@ -6,7 +6,7 @@ import "testing"
|
||||
// delivered on a node, read by the view (moving, settled, stuck, as its motionOf said them) and by the condition keeper
|
||||
// (delivering, failed, ended). Wants and haves as the assigner and the node-engine write them (a refusal is written as phase failed at the prior fingerprint).
|
||||
func TestMotionOf(t *testing.T) {
|
||||
want := Want{FP: "fp-new", Composed: "sha256:new"}
|
||||
want := Want{FP: "fp-new"}
|
||||
at := func(fp, composed string, phase, health string, detail string) Have {
|
||||
return Have{FP: fp, Composed: composed, Phase: phase, Health: health, Detail: detail}
|
||||
}
|
||||
@@ -34,8 +34,8 @@ func TestMotionOf(t *testing.T) {
|
||||
h: at("fp-new", "sha256:new", "checking", "unknown", ""), has: true, state: MotionMoving},
|
||||
{name: "running healthy at the want", w: want, wanted: true, h: at("fp-new", "sha256:new", PhaseRunning, HealthOK, ""), has: true,
|
||||
state: MotionSettled, outcome: OutcomeRunning, ended: true},
|
||||
{name: "running healthy at another composition", w: want, wanted: true, h: at("fp-new", "sha256:other", PhaseRunning, HealthOK, ""), has: true,
|
||||
state: MotionMoving},
|
||||
{name: "running healthy at the want, whatever composition the have names (H-A-78)", w: want, wanted: true,
|
||||
h: at("fp-new", "sha256:other", PhaseRunning, HealthOK, ""), has: true, state: MotionSettled, outcome: OutcomeRunning, ended: true},
|
||||
{name: "unhealthy at the want", w: want, wanted: true, h: at("fp-new", "sha256:new", PhaseRunning, HealthFailed, "exit 1"), has: true,
|
||||
state: MotionStuck, outcome: OutcomeFailed, failed: true, ended: true},
|
||||
{name: "its apply failed at the want", w: want, wanted: true, h: at("fp-new", "sha256:new", PhaseFailed, "unknown", "no image"), has: true,
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"description": "The assignment half of the revision view (ADR 0656 \u00a76): one assignment graph revision, named by its own number and naming its inputs, with its entries' digests; the trunk's newest when none is named, or a candidate's for its group and heads. Reads only.",
|
||||
"description": "The assignment half of the revision view (ADR 0656 §6): one assignment graph revision, named by its own number and naming its inputs, with its entries' digests; the trunk's newest when none is named, or a candidate's for its group and heads. Reads only.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -159,17 +159,23 @@
|
||||
{
|
||||
"name": "input",
|
||||
"class": "read",
|
||||
"description": "A step's input by its digest, as the assigner keeps it for the composition step it asked a build seat to run (design 47 G section 354).",
|
||||
"description": "A step's input by its digest, as the assigner keeps it for the composition step it asked a build seat to run (design 47 G section 354): its fields, then the bytes in chunks of at most 512 KiB on the chunk subject of the call, each acknowledged by the caller on the ack subject within 30 seconds; the input is of any size.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest"
|
||||
"digest",
|
||||
"call"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
@@ -179,14 +185,96 @@
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "the input's exact bytes, base64"
|
||||
"chunks": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "how many chunks are sent; 0 when there is no input of that digest"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest",
|
||||
"input"
|
||||
"chunks"
|
||||
]
|
||||
},
|
||||
"chunks": true
|
||||
},
|
||||
{
|
||||
"name": "compositions",
|
||||
"class": "read",
|
||||
"description": "Each composition run the assigner keeps (design 47 G §728): its program, input digest, ask, readers, outcome and verdict, and the state's fill against its cap; with candidate or machine, only those.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"candidate": {
|
||||
"type": "string",
|
||||
"description": "the candidate's key"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"runs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/CompositionRun"
|
||||
}
|
||||
},
|
||||
"fill": {
|
||||
"$ref": "#/defs/Fill"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"runs",
|
||||
"fill"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "compositions-drop",
|
||||
"class": "act",
|
||||
"description": "Drop one composition run by hand (design 47 G §728): the act and why are written in the hand-act log first, then the run's ask is dropped, each reader ended could not run naming the drop, and the key deleted.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"candidate": {
|
||||
"type": "string",
|
||||
"description": "the candidate's key"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why, written with the caller the runtime proves in the hand-act log"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"candidate",
|
||||
"machine",
|
||||
"why"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"run": {
|
||||
"$ref": "#/defs/CompositionRun",
|
||||
"description": "the entry deleted"
|
||||
},
|
||||
"ended": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/CompositionReader"
|
||||
},
|
||||
"description": "the readers it ended"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"run"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -295,6 +383,11 @@
|
||||
},
|
||||
{
|
||||
"name": "wanted",
|
||||
"subject": "wanted.<node>.<module>",
|
||||
"keep": {
|
||||
"last-per-subject": true,
|
||||
"max-age-days": 0
|
||||
},
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "an entry written as a want, from a trunk revision only",
|
||||
@@ -311,12 +404,20 @@
|
||||
"fp": {
|
||||
"type": "string"
|
||||
},
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline whose passed end the want was written from, its key <branch>.<source>; absent for a placement's build (design 47 H-A-56)"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer"
|
||||
},
|
||||
"removed": {
|
||||
"type": "boolean",
|
||||
"description": "true when the assigner removes the want of that node and module (the node left, or the module was unplaced); fp is then the fingerprint last wanted there (design 47 G section 693)"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@@ -331,6 +432,17 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pipeline-wanted",
|
||||
"subject": "pipeline-wanted.<branch>.<source>",
|
||||
"keep": {
|
||||
"max-age-days": 30,
|
||||
"max-mib": 64
|
||||
},
|
||||
"body": {
|
||||
"$ref": "#/defs/PipelineWanted"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "wait-held",
|
||||
"body": {
|
||||
@@ -373,50 +485,44 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "version-delivered",
|
||||
"keep": {
|
||||
"max-age-days": 90,
|
||||
"max-mib": 64
|
||||
},
|
||||
"name": "step-progress",
|
||||
"subject": "step-progress.<node>",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "a version delivered to every present machine that places it, and healthy (design 47 G section 376)",
|
||||
"description": "a composition step's progress, said once a minute while the assigner runs it (design 47 G section 496)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
"asker": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"phase": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "MAJOR.MINOR.PATCH"
|
||||
},
|
||||
"parts": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the digest of each of its parts, by artifact reference"
|
||||
},
|
||||
"away": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the machines away when it was said"
|
||||
"enum": [
|
||||
"fetch",
|
||||
"build",
|
||||
"run",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"shared": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Shared"
|
||||
},
|
||||
"description": "the composition runs the step waits on, by machine, each with its ask (design 47 G §723, §729)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"module",
|
||||
"version",
|
||||
"parts"
|
||||
"asker",
|
||||
"ask",
|
||||
"phase",
|
||||
"at"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -429,12 +535,13 @@
|
||||
{
|
||||
"name": "wants",
|
||||
"template": "state",
|
||||
"view": true,
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "want.<node>.<module>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a node's want for a module",
|
||||
"description": "a node's want for a module: the build it should run by its fingerprint and released version, with the pipeline and rank it was written from (design 47 H §750)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
@@ -442,19 +549,9 @@
|
||||
"fp": {
|
||||
"type": "string"
|
||||
},
|
||||
"composed": {
|
||||
"type": "string"
|
||||
},
|
||||
"removed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"newest": {
|
||||
"type": "string"
|
||||
},
|
||||
"rule": {
|
||||
"type": "integer",
|
||||
"description": "the rule that holds the node back, 1 to 10"
|
||||
},
|
||||
"backup": {
|
||||
"type": "string",
|
||||
"description": "again or skip",
|
||||
@@ -463,6 +560,13 @@
|
||||
"skip"
|
||||
]
|
||||
},
|
||||
"revert": {
|
||||
"type": "string",
|
||||
"description": "live: the operator's answer to a held revert, to start the reverted build on the live data as it is, with nothing restored (design 47 G section 710)",
|
||||
"enum": [
|
||||
"live"
|
||||
]
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -483,14 +587,16 @@
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "the module's released version, for people; none for a build of another watched branch (design 47 G section 379)"
|
||||
"description": "the version released at the build the want names: the newest released on the placement's branch whose pipeline passed, or the placement's build's (design 47 H §750)"
|
||||
},
|
||||
"parts": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the digest of each of the module's parts, by artifact reference; the node-engine fetches and checks each part by it (design 47 G section 379)"
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline whose passed end released the version, its key <branch>.<source>; absent for a placement's build (design 47 H §750, H-A-37)"
|
||||
},
|
||||
"rank": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": "the mover's tier in that pipeline's delivery order, from 1; the node-engine applies one pipeline's wants by it; absent with pipeline (design 47 H §750, §771, H-A-37)"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -547,6 +653,64 @@
|
||||
"history": 20,
|
||||
"description": "what each node should run, and the fingerprints held back"
|
||||
},
|
||||
{
|
||||
"name": "asks",
|
||||
"template": "state",
|
||||
"view": true,
|
||||
"history": 5,
|
||||
"description": "the asks the assigner puts to a person about what a node runs, one key per ask, each the ask as the assigner composes it (design 47 G section 717)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "hold.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a module's held fingerprint whose health check failed: release it or keep it held"
|
||||
},
|
||||
{
|
||||
"key": "restore.<node>.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a data module set back on a node: restore and lose newer writes, or leave it stopped (ADR 0429 section 6)"
|
||||
},
|
||||
{
|
||||
"key": "backup.<node>.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a backup that failed before a node applies a fingerprint: back up again, or go on without one (ADR 0539 section 16)"
|
||||
},
|
||||
{
|
||||
"key": "record.<node>.<module>.<digest>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a move a person must allow for a module of policy record, naming the composition's digest (ADR 0539 section 14)"
|
||||
},
|
||||
{
|
||||
"key": "outside.<node>.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a moved module whose failing health check waited past its bound on an outside cause (design 47 G section 706)"
|
||||
},
|
||||
{
|
||||
"key": "revert.<node>.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the ask about a held revert with no restore point, the reverted build's fingerprint (design 47 G section 710)"
|
||||
},
|
||||
{
|
||||
"key": "assignments.<proposal>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Ask"
|
||||
},
|
||||
"description": "the authorising ask about a proposal of assignments (ADR 0567 section 5)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "differences",
|
||||
"template": "state",
|
||||
@@ -678,22 +842,6 @@
|
||||
"description": "an entry, written once, removed when no kept revision lists it"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "inputs",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "a step's input, named by its write time and its sha256 (design 47 G section 354)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<time>.<digest>",
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "the input's bytes, base64"
|
||||
},
|
||||
"description": "one input"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
@@ -717,11 +865,11 @@
|
||||
},
|
||||
"provision": {
|
||||
"type": "string",
|
||||
"description": "for provisioning, the provision"
|
||||
"description": "for provisioning and contribution, the requirement"
|
||||
},
|
||||
"seat": {
|
||||
"type": "string",
|
||||
"description": "for contribution, the seat it contributes to; for acting, the seat whose rule gave the edge"
|
||||
"description": "for acting only, the seat whose rule gave the edge"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
@@ -769,6 +917,13 @@
|
||||
"items": {
|
||||
"$ref": "#/defs/Edge"
|
||||
}
|
||||
},
|
||||
"held": {
|
||||
"type": "array",
|
||||
"description": "the requirements no step of the order resolves (design 47 G section 357): the entry is held, naming the candidates, and nothing is guessed",
|
||||
"items": {
|
||||
"$ref": "#/defs/Held"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -779,6 +934,46 @@
|
||||
"catalog"
|
||||
]
|
||||
},
|
||||
"Held": {
|
||||
"type": "object",
|
||||
"description": "one requirement an entry is held on, for want of a provider (design 47 G section 708): the assigner writes no want from a held entry, so the node keeps what it runs",
|
||||
"properties": {
|
||||
"requirement": {
|
||||
"type": "string",
|
||||
"description": "the requirement no step of the order resolves"
|
||||
},
|
||||
"seat": {
|
||||
"type": "string",
|
||||
"description": "the seat that delivers the requirement and that no placement holds; only where the named seat's step held it"
|
||||
},
|
||||
"candidates": {
|
||||
"type": "array",
|
||||
"description": "each placed module that provides it, sorted; empty when none does",
|
||||
"items": {
|
||||
"$ref": "#/defs/HeldCandidate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"requirement"
|
||||
]
|
||||
},
|
||||
"HeldCandidate": {
|
||||
"type": "object",
|
||||
"description": "one placed provider of a held requirement",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module"
|
||||
]
|
||||
},
|
||||
"NodeEntryRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -843,7 +1038,18 @@
|
||||
},
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the digest of the node's capability reading"
|
||||
"description": "the digest of the node's capability reading: the engine's manifest reads, its tool runner's readings and that runner's fingerprint"
|
||||
},
|
||||
"readings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the capabilities the node's tool runner states of the calls it answers, as the node's record carries them (design 46 approval mark 6)"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the fingerprint of the tool runner that announced the readings; empty when none is known"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -899,6 +1105,30 @@
|
||||
"$ref": "#/defs/Edge"
|
||||
},
|
||||
"description": "the edges that moved"
|
||||
},
|
||||
"after": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the kind of the edge that orders the change after that one: provisioning, contribution or acting"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module",
|
||||
"kind"
|
||||
]
|
||||
},
|
||||
"description": "the other changes of the difference it is ordered after, each with its edge's kind (design 47 G section 512)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -945,7 +1175,7 @@
|
||||
"$ref": "#/defs/NodeEntryRef"
|
||||
}
|
||||
},
|
||||
"description": "the order as a view: each tier the changes whose acting parts acted in the tiers before it (ADR 0603 \u00a76 as ADR 0656 changes it)"
|
||||
"description": "the order as a view: each tier the changes whose acting parts acted in the tiers before it (ADR 0603 §6 as ADR 0656 changes it)"
|
||||
},
|
||||
"refused": {
|
||||
"type": "array",
|
||||
@@ -975,10 +1205,26 @@
|
||||
},
|
||||
"Wait": {
|
||||
"type": "object",
|
||||
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs",
|
||||
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs; the builder's toolchain wait is of this type too, with step build (design 47 G section 702)",
|
||||
"properties": {
|
||||
"step": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"take-in",
|
||||
"validate",
|
||||
"check",
|
||||
"build",
|
||||
"compose",
|
||||
"grant",
|
||||
"place",
|
||||
"pipeline",
|
||||
"put",
|
||||
"delivery",
|
||||
"kept-build",
|
||||
"backup",
|
||||
"outside"
|
||||
],
|
||||
"description": "which wait: an acting step of section 203 or put, delivery, kept-build, backup, or outside, a moved module's failing check held on an outside cause (design 47 G section 498, section 706)"
|
||||
},
|
||||
"part": {
|
||||
"type": "string",
|
||||
@@ -1008,18 +1254,43 @@
|
||||
},
|
||||
"how": {
|
||||
"type": "string",
|
||||
"description": "on wait-ended: ran or released"
|
||||
"description": "on wait-ended: ran, released or superseded"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "on a release, who released it and why"
|
||||
},
|
||||
"clock-from": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "the time the bound counts from (design 47 G section 266, section 269, section 498)"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "a put's wait: the fingerprint of the build put"
|
||||
},
|
||||
"machines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "a dependent's delivery wait: the machines the dependency's version has yet to reach"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string",
|
||||
"description": "the seat holding the wait (design 47 G section 512, section 629)"
|
||||
},
|
||||
"on": {
|
||||
"type": "string",
|
||||
"description": "what it waits on (design 47 G section 512, section 629)"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "the wait in plain words (design 47 G section 512, section 629)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"step",
|
||||
"part",
|
||||
"version",
|
||||
"module",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
@@ -1055,15 +1326,16 @@
|
||||
},
|
||||
"StepRun": {
|
||||
"type": "object",
|
||||
"description": "the composition step of one module's pipeline (design 47 *Pipeline steps and the policy*, *The pipeline makes the check*): the assigner composes each machine's declaration at the change's heads with the composer built from them, in the build seat's sandbox, and refuses a change in which two modules own one path",
|
||||
"description": "a pipeline step of one mover the assigner serves (design 47 H §745, G §22): validate, the manifest validator built from the take-in's heads run over the revision's manifests, before composition, each machine's declaration composed at the change's heads with the composer built from them, both in the build seat's sandbox",
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
"description": "the runner's pipeline key, <branch>.<source>, a branch escaped as a key's name is (design 47 H §746)"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"composition"
|
||||
]
|
||||
},
|
||||
@@ -1114,7 +1386,7 @@
|
||||
},
|
||||
"StepEnded": {
|
||||
"type": "object",
|
||||
"description": "the composition step's end, said by the assigner on the node it runs on (ADR 0666 sections 7, 21): the runner takes it only from that holder's account, naming the ask, the commit and the fingerprint it was asked at",
|
||||
"description": "a validate or composition step's end, said by the assigner on the node it runs on (ADR 0666 sections 7, 21): the runner takes it only from that holder's account, naming the ask, the commit and the fingerprint it was asked at",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
@@ -1130,6 +1402,7 @@
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"composition"
|
||||
]
|
||||
},
|
||||
@@ -1158,7 +1431,7 @@
|
||||
},
|
||||
"said": {
|
||||
"type": "string",
|
||||
"description": "why it failed or could not run: the two modules owning one path, the part not heard"
|
||||
"description": "why it failed or could not run: each manifest problem, the cycle the revision makes, the two modules owning one path, the part not heard (design 47 H §745)"
|
||||
},
|
||||
"warnings": {
|
||||
"type": "array",
|
||||
@@ -1181,6 +1454,13 @@
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"shared": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Shared"
|
||||
},
|
||||
"description": "per machine composed, the composition run the step read, its ask and so where its verdict was taken (design 47 G §723, §729)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1215,6 +1495,275 @@
|
||||
"branch",
|
||||
"revision"
|
||||
]
|
||||
},
|
||||
"Ask": {
|
||||
"type": "object",
|
||||
"description": "an ask the assigner puts to a person: the router's ask whole, as the assigner composes it, and how many times it was written at its key",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"ask": {
|
||||
"type": "object",
|
||||
"description": "the seat operator-channel's ask, whole"
|
||||
},
|
||||
"asking": {
|
||||
"type": "integer",
|
||||
"description": "the times the assigner wrote the ask at this key: 0 or 1 for the first, n for the n-th"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ask"
|
||||
]
|
||||
},
|
||||
"Shared": {
|
||||
"type": "object",
|
||||
"description": "a run whose result a step took or waits on, asked once for every step that reads it (design 47 G §729, A-469t): for a composition step one per machine composed, `run` the `composition-runs` key and `ask` its run ask's id; for a test step one with no machine, `run` the `test-runs` key, `ask` its build seat ask's id and `asked-by` the step that asked the run, left out for that step itself",
|
||||
"properties": {
|
||||
"machine": {
|
||||
"type": "string",
|
||||
"description": "the machine composed, for a composition run"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run's key: in the assigner's composition-runs, or the runner's test-runs"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the id of the run's ask of the build seat"
|
||||
},
|
||||
"asked-by": {
|
||||
"type": "object",
|
||||
"description": "the step that asked the run, for a test step reading another's run",
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "its pipeline's key"
|
||||
},
|
||||
"artifact": {
|
||||
"type": "string",
|
||||
"description": "its artifact, <module>:<artifact>"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"pipeline",
|
||||
"artifact"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"run",
|
||||
"ask"
|
||||
]
|
||||
},
|
||||
"CompositionReader": {
|
||||
"type": "object",
|
||||
"description": "a composition step reading a composition run: its step, as the runner asked it, with its ask's id (design 47 G §719, A-468)",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the step's ask's id"
|
||||
},
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"composition"
|
||||
]
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch, or the branch of a run on request"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the commit the step runs at"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "the catalog graph revision of the branch the pipeline runs for"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision of the watched branch; absent for a run on request"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id: its composition writes no want (ADR 0666 section 18)"
|
||||
},
|
||||
"rerun": {
|
||||
"type": "boolean",
|
||||
"description": "the step is asked again by the runner's rerun"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "for a rerun, the caller the runtime proved"
|
||||
},
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when the reader's step said its end; carried into a rerun's run, so a take-up tells a reader that passed from one that joined later (A-470m)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"pipeline",
|
||||
"step",
|
||||
"module",
|
||||
"branch",
|
||||
"commit",
|
||||
"fingerprint"
|
||||
]
|
||||
},
|
||||
"CompositionRun": {
|
||||
"type": "object",
|
||||
"description": "one composition run of a candidate and a machine, a key of the assigner's state composition-runs (design 47 G §719, §728; A-469u)",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the key, <candidate key>.<machine>, each part escaped as a key's name"
|
||||
},
|
||||
"candidate": {
|
||||
"type": "string",
|
||||
"description": "the candidate's key: <branch>.<revision>, or run-<id> for a run on request"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"program": {
|
||||
"type": "object",
|
||||
"description": "the composer program, chosen once when the run started",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"directory": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the node-engine fingerprint it was chosen from"
|
||||
}
|
||||
}
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "the digest of the kept request"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the id of the build seat's run ask"
|
||||
},
|
||||
"started": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"readers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/CompositionReader"
|
||||
},
|
||||
"description": "the composition steps reading the run"
|
||||
},
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"passed",
|
||||
"failed",
|
||||
"could not run"
|
||||
]
|
||||
},
|
||||
"said": {
|
||||
"type": "string",
|
||||
"description": "the outcome's words"
|
||||
},
|
||||
"verdict": {
|
||||
"type": "object",
|
||||
"description": "that machine's composer verdict (design 47 G §721)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"candidate",
|
||||
"machine"
|
||||
]
|
||||
},
|
||||
"PipelineWanted": {
|
||||
"type": "object",
|
||||
"description": "a pipeline's wants written to the end, said once: running when every tier's movers run on every present placing machine, tier-late when a tier passed tier-bound (design 47 H §751, H-A-56, H-A-72, H-A-75)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the runner's pipeline key, <branch>.<source>, a branch escaped as a key's name is (design 47 H §746)"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"running",
|
||||
"tier-late"
|
||||
]
|
||||
},
|
||||
"not-running": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/NotRunning"
|
||||
},
|
||||
"description": "for tier-late, the late tier's movers not running and the machines they do not run on"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"pipeline",
|
||||
"branch",
|
||||
"source",
|
||||
"outcome"
|
||||
]
|
||||
},
|
||||
"NotRunning": {
|
||||
"type": "object",
|
||||
"description": "a mover of a late tier and the placing machines it does not run on",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"machines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"machines"
|
||||
]
|
||||
}
|
||||
},
|
||||
"acts": [
|
||||
|
||||
Reference in New Issue
Block a user