Flake history -> a verdict per test case. Pure: the history rows
(CaseOutcome, see hive-compose.schema) and the thresholds arrive as
values.
A case is identified by [suite project case-id]; its rows are put in run
order (by :at, then :run/id), one per run (a run recorded twice keeps
one row), so the order the rows were appended in never matters. :error
counts as a fail; :skipped runs are counted but judged as neither.
The verdict looks at the last :window judged runs, first rule wins:
:stable no fail in the window
:regression no pass in the window, or it ends with :streak or more
consecutive fails, or with fails after passes and no flip
back (P..PF..F): failing since :since, the first run after
the last pass (its :run/sha names the commit when recorded)
:fixed :streak or more fails then :streak or more passes
closing the window, or fails then passes and no flip back
:flaky passes and fails interleaved (two flips or more) over
:min-runs runs or more, with a flip rate (status changes
between consecutive runs over runs - 1) of :flip-rate or
more
:stable otherwise (too few runs, or fails too rare to call)
OOM-killed rows (:case/oom? true, see hive-compose.promote.oom) are
never judged: they neither fail nor flip a case, so an OOM is never read
as a flake. A case with an OOM row in its last :window runs and no real
fail there is classed :oom; real fails beside it keep their own class.
Either way the report counts them under :ooms with :last-oom.
The score ranking cases is the window's flip rate, scaled down while the
window holds fewer than :min-runs runs.
Thresholds: defaults, overridden by :compose/flaky in the addon config.
Flake history -> a verdict per test case. Pure: the history rows
(CaseOutcome, see `hive-compose.schema`) and the thresholds arrive as
values.
A case is identified by [suite project case-id]; its rows are put in run
order (by `:at`, then `:run/id`), one per run (a run recorded twice keeps
one row), so the order the rows were appended in never matters. :error
counts as a fail; :skipped runs are counted but judged as neither.
The verdict looks at the last `:window` judged runs, first rule wins:
:stable no fail in the window
:regression no pass in the window, or it ends with `:streak` or more
consecutive fails, or with fails after passes and no flip
back (P..PF..F): failing since `:since`, the first run after
the last pass (its `:run/sha` names the commit when recorded)
:fixed `:streak` or more fails then `:streak` or more passes
closing the window, or fails then passes and no flip back
:flaky passes and fails interleaved (two flips or more) over
`:min-runs` runs or more, with a flip rate (status changes
between consecutive runs over runs - 1) of `:flip-rate` or
more
:stable otherwise (too few runs, or fails too rare to call)
OOM-killed rows (`:case/oom? true`, see `hive-compose.promote.oom`) are
never judged: they neither fail nor flip a case, so an OOM is never read
as a flake. A case with an OOM row in its last `:window` runs and no real
fail there is classed :oom; real fails beside it keep their own class.
Either way the report counts them under :ooms with :last-oom.
The score ranking cases is the window's flip rate, scaled down while the
window holds fewer than `:min-runs` runs.
Thresholds: `defaults`, overridden by `:compose/flaky` in the addon config.(case-key row)[suite project case-id] of a row.
[suite project case-id] of a row.
(case-report cfg rows)The verdict on one case from all its rows, under thresholds cfg.
The verdict on one case from all its `rows`, under thresholds `cfg`.
(classify {:keys [min-runs flip-rate streak]} w)The class of w, the verdicts (:pass | :fail, oldest first) of a window,
under thresholds cfg (see the namespace doc).
The class of `w`, the verdicts (:pass | :fail, oldest first) of a window, under thresholds `cfg` (see the namespace doc).
(config overrides)The thresholds: defaults with the known keys of overrides (nil or a
map) over them.
The thresholds: `defaults` with the known keys of `overrides` (nil or a map) over them.
(matching {:keys [suite project]} rows)The rows of rows that query {:suite s :project p} selects; a nil or
absent key selects any.
The rows of `rows` that `query` {:suite s :project p} selects; a nil or
absent key selects any.(ordered rows)The rows of one case in run order, one per run. A run recorded more than once keeps its worst row (:error > :failed > :passed > :skipped) at the earliest time it was recorded, so recording a run again never moves it in run order.
The rows of one case in run order, one per run. A run recorded more than once keeps its worst row (:error > :failed > :passed > :skipped) at the earliest time it was recorded, so recording a run again never moves it in run order.
(rank cfg rows)The verdict on every case of rows under thresholds cfg: :flaky cases
first, then :regression, :fixed and :stable; within a class by score, then
window fails, then fails, then case key.
The verdict on every case of `rows` under thresholds `cfg`: :flaky cases first, then :regression, :fixed and :stable; within a class by score, then window fails, then fails, then case key.
(run-outcomes run at)The CaseOutcome rows of run result run, recorded at its own time
(:run/at, else :finished-at, else :started-at) or at at (epoch ms)
when it carries none.
run is the run result hc-8's suite runner answers:
{:run/id RunId :suite/id s :project p :exit n-or-nil :status s?
:run/sha sha? :started-at ms? :finished-at ms?
:report {:report/format :junit|:tap
:report/cases [{:case/id "<suite>/<classname>.<name>"
:case/status :passed|:failed|:error|:skipped
:case/time-s seconds-or-nil ..} ..]}}
Only the keys above are read. One row per case, plus one for the runner
itself, case <suite>/(run): :error when its report holds no case and it
did not exit 0 (it exited non-zero, or was killed or timed out, exit nil,
before writing it), else :passed. So a runner that dies shows in the
history, and one that recovers reads :fixed instead of staying a
regression. A run with no case and neither an :exit nor a :status key
records nothing.
The CaseOutcome rows of run result `run`, recorded at its own time
(`:run/at`, else `:finished-at`, else `:started-at`) or at `at` (epoch ms)
when it carries none.
`run` is the run result hc-8's suite runner answers:
{:run/id RunId :suite/id s :project p :exit n-or-nil :status s?
:run/sha sha? :started-at ms? :finished-at ms?
:report {:report/format :junit|:tap
:report/cases [{:case/id "<suite>/<classname>.<name>"
:case/status :passed|:failed|:error|:skipped
:case/time-s seconds-or-nil ..} ..]}}
Only the keys above are read. One row per case, plus one for the runner
itself, case `<suite>/(run)`: :error when its report holds no case and it
did not exit 0 (it exited non-zero, or was killed or timed out, exit nil,
before writing it), else :passed. So a runner that dies shows in the
history, and one that recovers reads :fixed instead of staying a
regression. A run with no case and neither an `:exit` nor a `:status` key
records nothing.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 |