The suite x project matrix run (hc-8), over the context hive-compose.pipeline.ops
takes, plus :suite-runner (a hive-compose.port/ISuiteRunner).
test! expand the matrix (promote.suite), bring up ONE stack for it, the
union of the projects under test and the suites' own needs
(hc-6 stack-up! with :extra), run every cell's runner through
ISuiteRunner under its resource caps (hc-16b), read its reports
(boundary.report), fold the cell result, record it in the flake
history (hc-13, when present), then the matrix summary. A matrix
that passed is taken down unless :keep-up?; a failed one stays up
for inspection (the reaper TTL still applies, and stack-down run=<run> releases it).
Optional context keys: :id-source (fn [n-bytes]) -> 2n hex chars for
trace ids, :rand-hex (0-arity, 6 hex chars) for run ids, :state-dir
(default: the state file's directory), :otlp-env (default
promote.otel/otlp-env when the stack binds an otel instance, else none),
:record-run! (fn [ctx cell-result]) -> Result, the flake history
(hc-13), none when absent, :data-phase! (fn [ctx run phase]) (hc-9
pipeline.data/run-phase!), and :default-resources, the caps of a suite
that declares none (:compose/default-resources).
Each cell's full result goes to <state>/runs/<run>/<suite>/<project>/result.edn
and the matrix answer to <state>/runs/<run>/summary.edn (boundary.runs).
Every entry point answers a Result and never throws. An interrupt (a cancelled call) stops the matrix: the cells not yet started answer :compose/interrupted, and the flag is restored for the caller.
The suite x project matrix run (hc-8), over the context `hive-compose.pipeline.ops`
takes, plus `:suite-runner` (a `hive-compose.port/ISuiteRunner`).
test! expand the matrix (promote.suite), bring up ONE stack for it, the
union of the projects under test and the suites' own needs
(hc-6 stack-up! with :extra), run every cell's runner through
ISuiteRunner under its resource caps (hc-16b), read its reports
(boundary.report), fold the cell result, record it in the flake
history (hc-13, when present), then the matrix summary. A matrix
that passed is taken down unless :keep-up?; a failed one stays up
for inspection (the reaper TTL still applies, and `stack-down
run=<run>` releases it).
Optional context keys: `:id-source` (fn [n-bytes]) -> 2n hex chars for
trace ids, `:rand-hex` (0-arity, 6 hex chars) for run ids, `:state-dir`
(default: the state file's directory), `:otlp-env` (default
`promote.otel/otlp-env` when the stack binds an otel instance, else none),
`:record-run!` (fn [ctx cell-result]) -> Result, the flake history
(hc-13), none when absent, `:data-phase!` (fn [ctx run phase]) (hc-9
`pipeline.data/run-phase!`), and `:default-resources`, the caps of a suite
that declares none (`:compose/default-resources`).
Each cell's full result goes to `<state>/runs/<run>/<suite>/<project>/result.edn`
and the matrix answer to `<state>/runs/<run>/summary.edn` (boundary.runs).
Every entry point answers a Result and never throws. An interrupt (a
cancelled call) stops the matrix: the cells not yet started answer
:compose/interrupted, and the flag is restored for the caller.How many cases a cell lists by id, status and time in the answer
(:report/cases); the rest are counted in :report/cases-more, and every
case stays in result.edn.
How many cases a cell lists by id, status and time in the answer (`:report/cases`); the rest are counted in `:report/cases-more`, and every case stays in result.edn.
How many failed cases a cell lists in the answer; the count of the rest is given, and every case stays in result.edn.
How many failed cases a cell lists in the answer; the count of the rest is given, and every case stays in result.edn.
How long a line of a runner's output tail may be in the answer.
How long a line of a runner's output tail may be in the answer.
How much of a case's message or output the answer carries; the full text stays in the cell's reports dir and in its result.edn.
How much of a case's message or output the answer carries; the full text stays in the cell's reports dir and in its result.edn.
(claim-agent run nonce)The claim id of one matrix on run: test:<run>:<nonce>.
The claim id of one matrix on `run`: `test:<run>:<nonce>`.
test! holds the run it works on under its own claim test:<run>:<nonce>
(one nonce per matrix, so two matrices on one run never renew or drop each
other's claim) from the instant stack-up! records the run (or the reuse
claim) to the end, its lease (:seen) renewed before every cell and data
phase to cover that step's deadline, so the reaper never takes a matrix
down mid-run. claim-exclusive! refuses a reuse while any live claim of
this prefix holds the run.
test! holds the run it works on under its own claim `test:<run>:<nonce>` (one nonce per matrix, so two matrices on one run never renew or drop each other's claim) from the instant stack-up! records the run (or the reuse claim) to the end, its lease (`:seen`) renewed before every cell and data phase to cover that step's deadline, so the reaper never takes a matrix down mid-run. `claim-exclusive!` refuses a reuse while any live claim of this prefix holds the run.
A cell's deadline when its suite sets no :suite/timeout-ms: what the claim lease covers and the runner bounds the run by.
A cell's deadline when its suite sets no :suite/timeout-ms: what the claim lease covers and the runner bounds the run by.
The claim lease a data phase runs under.
The claim lease a data phase runs under.
Generated test run ids are test<6 hex>.
Generated test run ids are `test<6 hex>`.
(test! ctx {:keys [keep-up? dry-run? wait?] :or {wait? true} :as opts})Result<{:run :stack :status :exit :summary :cells [cell-result] :stack-kept?
:reused? :summary-file}>: run the suite x project (x variant) matrix
opts {:suites names :projects names :variants names :run RunId?
:keep-up? :wait? (default true) :dry-run? :skip-fails?}; names as
promote.suite/parse-names takes them ("X,Y", a coll, nil for all).
:skip-fails? (nil: each suite's own :suite/skip-fails?) makes a skipped
case fail its cell. :exit is 0 every cell passed, 1 a test failed, 2
something could not run (2 wins). A suite's :suite/variants run as cells
of their own (<suite>@<variant>), one after the other on the same stack,
each with its env over the suite's, applied to the runner only.
Without :run (or with a :run no stack holds), a stack of its own comes up (hc-6 stack-up!, which claims the run id atomically) for the union of what the cells need. With the :run of a live, :up stack run that no other matrix works on, the suites run on that run: claimed first, then each suite consumer gets its view network, joined by the run's instances it needs, removed afterwards; the run itself is never taken down. With :dry-run? nothing starts: the answer is the matrix, the stack plan and every runner spec (secret references rendered).
Never throws: an unexpected throw answers :compose/test-threw naming the run and the stack-down that releases it.
Result<{:run :stack :status :exit :summary :cells [cell-result] :stack-kept?
:reused? :summary-file}>: run the suite x project (x variant) matrix
`opts` {:suites names :projects names :variants names :run RunId?
:keep-up? :wait? (default true) :dry-run? :skip-fails?}; names as
promote.suite/parse-names takes them ("X,Y", a coll, nil for all).
`:skip-fails?` (nil: each suite's own :suite/skip-fails?) makes a skipped
case fail its cell. `:exit` is 0 every cell passed, 1 a test failed, 2
something could not run (2 wins). A suite's :suite/variants run as cells
of their own (`<suite>@<variant>`), one after the other on the same stack,
each with its env over the suite's, applied to the runner only.
Without :run (or with a :run no stack holds), a stack of its own comes up
(hc-6 stack-up!, which claims the run id atomically) for the union of what
the cells need. With the :run of a live, :up stack run that no other
matrix works on, the suites run on that run: claimed first, then each
suite consumer gets its view network, joined by the run's instances it
needs, removed afterwards; the run itself is never taken down. With
:dry-run? nothing starts: the answer is the matrix, the stack plan and
every runner spec (secret references rendered).
Never throws: an unexpected throw answers :compose/test-threw naming the
run and the stack-down that releases it.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |