The runner refused every test run once test-runs held 16 MiB, its setting's default, while its bucket is 64 MiB: seven days of runs never fit, so every pipeline stopped. The cap is now the bucket's max bytes, read from the bus (the KV stream's Config.MaxBytes, which runsFill already read): the bucket is the one truth of the manifest's max-mib, so the runner keeps no second number and does not read its manifest. The manifest changes: the setting test-runs-cap-mib, its file resource test-runs-cap and its environment line go, and test-runs-kept's default is 48h (code and manifest). At nine tenths of the cap the Ager deletes the oldest ended runs with their output objects, in the step log's order from the test runs' retention, until the fill is under eight tenths, said in one journal line of how many and how old; a run not ended is never aged by fill. Builds: design 47 H2 H-A-510, H-A-510 addendum (lead answer)
419 lines
12 KiB
JSON
419 lines
12 KiB
JSON
{
|
|
"module": "mesh-delivery-pipeline",
|
|
"version": "0.1",
|
|
"class": "core",
|
|
"slug": "pipeline",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-pipeline-runner",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"run",
|
|
"start",
|
|
"show",
|
|
"list",
|
|
"stands",
|
|
"why-carried",
|
|
"kept",
|
|
"review",
|
|
"rerun",
|
|
"accept",
|
|
"cancel",
|
|
"end-again",
|
|
"place",
|
|
"place-unfinished",
|
|
"ask-again",
|
|
"test-runs",
|
|
"test-runs-drop"
|
|
]
|
|
}
|
|
],
|
|
"tools": [
|
|
"runner_first_views",
|
|
"runner_first_view_again",
|
|
"runner_health",
|
|
"runner_unlogged",
|
|
"runner_unlogged_append",
|
|
"runner_start",
|
|
"runner_run",
|
|
"runner_accept",
|
|
"runner_ask_again",
|
|
"runner_place",
|
|
"runner_end_again",
|
|
"runner_waiting",
|
|
"runner_test_runs",
|
|
"runner_test_runs_drop",
|
|
"runner_unfinished",
|
|
"runner_unfinished_drop",
|
|
"runner_unfinished_place",
|
|
"runner_show",
|
|
"runner_movers",
|
|
"runner_step_output"
|
|
],
|
|
"consumes": [
|
|
"mesh-delivery-indexer.take-in.taken",
|
|
"mesh-builds.package-published",
|
|
"mesh-builds.toolchain-agreed",
|
|
"mesh-builds.step-ended",
|
|
"mesh-builds.ask-taken",
|
|
"operator-channel.decided",
|
|
"node-build-go.step-ended",
|
|
"node-build-node.step-ended",
|
|
"node-build-image.step-ended",
|
|
"node-build-go.ask-taken",
|
|
"node-build-node.ask-taken",
|
|
"node-build-image.ask-taken",
|
|
"node-build-go.step-progress",
|
|
"node-build-node.step-progress",
|
|
"node-build-image.step-progress",
|
|
"mesh-wants.step-ended",
|
|
"mesh-wants.step-progress",
|
|
"mesh-wants.ask-taken",
|
|
"node-engine.running",
|
|
"mesh-catalog.registration-changed",
|
|
"mesh-catalog.catalog-revision",
|
|
"mesh-catalog.version-released",
|
|
"mesh-conditions.findings-asked",
|
|
"mesh-delivery.recovery-merged",
|
|
"mesh-catalog.seat-definition-changed",
|
|
"mesh-catalog.seat-definition-removed",
|
|
"seat:mesh-module-assigner.views.seat-holders"
|
|
],
|
|
"invokes": [
|
|
"seat:mesh-catalog.seat-definitions",
|
|
"seat:mesh-catalog.registrations",
|
|
"seat:mesh-catalog.revision",
|
|
"seat:mesh-hand-acts.hand-act",
|
|
"seat:git.pull",
|
|
"seat:git.trees",
|
|
"seat:mesh-module-assigner.assignments",
|
|
"seat:mesh-grants.grants-for",
|
|
"seat:mesh-builds.step",
|
|
"seat:mesh-builds.published",
|
|
"seat:mesh-builds.drop",
|
|
"seat:mesh-wants.step",
|
|
"seat:mesh-wants.drop",
|
|
"seat:node-build-go.check.step",
|
|
"seat:node-build-node.check.step",
|
|
"seat:node-build-image.check.step",
|
|
"seat:node-build-go.delivery.step",
|
|
"seat:node-build-node.delivery.step",
|
|
"seat:node-build-image.delivery.step",
|
|
"seat:node-build-go.drop",
|
|
"seat:node-build-node.drop",
|
|
"seat:node-build-image.drop",
|
|
"seat:node-build-go.accept.check",
|
|
"seat:node-build-go.accept.delivery",
|
|
"seat:node-build-node.accept.check",
|
|
"seat:node-build-node.accept.delivery",
|
|
"seat:node-build-image.accept.check",
|
|
"seat:node-build-image.accept.delivery",
|
|
"seat:node-build-go.output",
|
|
"seat:node-build-node.output",
|
|
"seat:node-build-image.output"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"config": {
|
|
"test-runs-kept": {
|
|
"type": "string",
|
|
"description": "how long an ended test run and its output object are kept after its end, a Go duration such as 48h (design 47 G section 725, A-469x, A-470a, H-A-510); at most 168h, so the pipeline naming its key is still kept. Past nine tenths of the state's max-mib the oldest ended runs go sooner, until it is under eight tenths.",
|
|
"trusted": false,
|
|
"default": "48h"
|
|
},
|
|
"test-step-bound": {
|
|
"type": "string",
|
|
"description": "how long a taken test run's ask may say no progress before the run ends could not run, a Go duration such as 30m, counted from the build seat's ask-taken and again from each step-progress (design 47 G section 725, A-466n, A-469x).",
|
|
"trusted": false,
|
|
"default": "30m"
|
|
},
|
|
"widens-read-bound": {
|
|
"type": "string",
|
|
"description": "how long one read of a pipeline end's widens (the catalog's revision, the seat holders, the grants part) waits for its answer before it is cut and said could not run, a Go duration such as 30s (design 47 G A-472, A-472a, H2 H-A-478: long enough that a cold grants-for is not cut).",
|
|
"trusted": false,
|
|
"default": "30s"
|
|
},
|
|
"revisions-kept": {
|
|
"type": "number",
|
|
"description": "how many catalog revisions the runner keeps once read, each some 1.4 MB, so a pipeline end does not read them again (design 47 G A-472, A-472a).",
|
|
"minimum": 1,
|
|
"maximum": 32,
|
|
"trusted": false,
|
|
"default": 6
|
|
},
|
|
"pipelines-at-once": {
|
|
"type": "number",
|
|
"description": "how many pipelines have their steps asked at once; a pipeline started over it waits its turn in the state queue, placed in order on every end (design 47 H section 748).",
|
|
"minimum": 1,
|
|
"maximum": 8,
|
|
"trusted": false,
|
|
"default": 1
|
|
},
|
|
"pipelines-waiting-cap": {
|
|
"type": "number",
|
|
"description": "how many pipelines may wait their turn under pipelines-at-once; a start over it raises the finding queue-full and is taken on the next end (design 47 H section 748).",
|
|
"minimum": 1,
|
|
"trusted": false,
|
|
"default": 64
|
|
},
|
|
"run-untaken-bound": {
|
|
"type": "string",
|
|
"description": "how long a test run's ask may wait untaken after the run's start before the run ends could not run, a Go duration such as 24h (design 47 G section 725, A-466s, A-469x).",
|
|
"trusted": false,
|
|
"default": "24h"
|
|
},
|
|
"ask-unanswered-bound": {
|
|
"type": "string",
|
|
"description": "how long an ask the runner puts on a seat, but a test run's, may go without its holder's first word (an ask-taken, a step progress or the step's end) before it is asked once more, and as long again before its step ends could not run, a Go duration such as 10m (design 47 H H-A-235, H-A-238).",
|
|
"trusted": false,
|
|
"default": "10m"
|
|
},
|
|
"stalled-bound": {
|
|
"type": "string",
|
|
"description": "how long a running pipeline may have nothing open and nothing newly placed, or a step's ask stay untaken, before the runner's health names it, a Go duration such as 5m (design 47 H2 sections 778, 790).",
|
|
"trusted": false,
|
|
"runtime": true,
|
|
"default": "5m"
|
|
},
|
|
"kept-call-pace-first": {
|
|
"type": "string",
|
|
"description": "how long a kept call waits after its first transport fault before it calls again, a Go duration such as 1s; each wait doubles to kept-call-pace-max and is drawn within 20 % of its value (design 47 H2 section 775).",
|
|
"trusted": false,
|
|
"runtime": true,
|
|
"default": "1s"
|
|
},
|
|
"kept-call-pace-max": {
|
|
"type": "string",
|
|
"description": "the longest wait between two calls of a kept call met by transport faults, a Go duration such as 30s (design 47 H2 section 775).",
|
|
"trusted": false,
|
|
"runtime": true,
|
|
"default": "30s"
|
|
}
|
|
},
|
|
"state": [
|
|
{
|
|
"name": "pipelines",
|
|
"history": 1,
|
|
"max-mib": 256
|
|
},
|
|
{
|
|
"name": "kept",
|
|
"history": 1,
|
|
"max-mib": 128
|
|
},
|
|
{
|
|
"name": "queue",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "aged",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "recoveries",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "toolchains",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "bounds",
|
|
"history": 1,
|
|
"key-ttl": true,
|
|
"max-mib": 16
|
|
},
|
|
{
|
|
"name": "test-runs",
|
|
"history": 1,
|
|
"max-mib": 64,
|
|
"key-ttl": true
|
|
},
|
|
{
|
|
"name": "findings",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "first-views",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "consumers",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
},
|
|
{
|
|
"name": "unfinished",
|
|
"history": 1,
|
|
"max-mib": 8
|
|
}
|
|
],
|
|
"streams": [
|
|
{
|
|
"name": "mesh-delivery-pipeline-findings",
|
|
"events": [
|
|
"finding-written.*",
|
|
"finding-cleared.*",
|
|
"findings-stated.*"
|
|
],
|
|
"max-age-days": 7,
|
|
"max-mib": 8
|
|
}
|
|
],
|
|
"objects": [
|
|
{
|
|
"name": "sent-objects",
|
|
"max-mib": 256
|
|
}
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-delivery-pipeline",
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-delivery-pipeline",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-delivery-pipeline"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "test-runs-kept",
|
|
"type": "file",
|
|
"path": "${dir:state}/test-runs-kept",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:test-runs-kept}"
|
|
},
|
|
{
|
|
"id": "test-step-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/test-step-bound",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:test-step-bound}"
|
|
},
|
|
{
|
|
"id": "run-untaken-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/run-untaken-bound",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:run-untaken-bound}"
|
|
},
|
|
{
|
|
"id": "ask-unanswered-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/ask-unanswered-bound",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:ask-unanswered-bound}"
|
|
},
|
|
{
|
|
"id": "widens-read-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/widens-read-bound",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:widens-read-bound}"
|
|
},
|
|
{
|
|
"id": "revisions-kept",
|
|
"type": "file",
|
|
"path": "${dir:state}/revisions-kept",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:revisions-kept}"
|
|
},
|
|
{
|
|
"id": "pipelines-at-once",
|
|
"type": "file",
|
|
"path": "${dir:state}/pipelines-at-once",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:pipelines-at-once}"
|
|
},
|
|
{
|
|
"id": "pipelines-waiting-cap",
|
|
"type": "file",
|
|
"path": "${dir:state}/pipelines-waiting-cap",
|
|
"owner": "mesh-delivery-pipeline",
|
|
"mode": "0600",
|
|
"content": "${config:pipelines-waiting-cap}"
|
|
},
|
|
{
|
|
"id": "pipeline",
|
|
"type": "process",
|
|
"name": "mesh-delivery-pipeline",
|
|
"artifact": "program",
|
|
"run": [
|
|
"./mesh-delivery-pipeline"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "${dir:state}/broker",
|
|
"MESH_RUNNER_TEST_RUNS_KEPT_FILE": "${dir:state}/test-runs-kept",
|
|
"MESH_RUNNER_TEST_STEP_BOUND_FILE": "${dir:state}/test-step-bound",
|
|
"MESH_RUNNER_WIDENS_READ_BOUND_FILE": "${dir:state}/widens-read-bound",
|
|
"MESH_RUNNER_REVISIONS_KEPT_FILE": "${dir:state}/revisions-kept",
|
|
"MESH_RUNNER_RUN_UNTAKEN_BOUND_FILE": "${dir:state}/run-untaken-bound",
|
|
"MESH_RUNNER_ASK_UNANSWERED_BOUND_FILE": "${dir:state}/ask-unanswered-bound",
|
|
"MESH_RUNNER_PIPELINES_AT_ONCE_FILE": "${dir:state}/pipelines-at-once",
|
|
"MESH_RUNNER_PIPELINES_WAITING_CAP_FILE": "${dir:state}/pipelines-waiting-cap"
|
|
},
|
|
"user": "mesh-delivery-pipeline",
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "program",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-delivery-pipeline",
|
|
"binary": "mesh-delivery-pipeline",
|
|
"needs": [
|
|
"mesh-delivery-assigner:program"
|
|
]
|
|
},
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-delivery-pipeline-tools",
|
|
"binary": "mesh-delivery-pipeline-tools",
|
|
"loads": [
|
|
"mesh-delivery-pipeline-tools"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"logs": [
|
|
{
|
|
"name": "step-log",
|
|
"max-age-days": 100,
|
|
"max-mib": 128
|
|
}
|
|
]
|
|
}
|