Value objects: Profile, Active entry, Settings, Release step, CaseOutcome; and for stacks Provide, Need, Stack, Instance, Resolution, Wiring, Suite, RunId with the pure Docker name builders slug, view-network and private-project.
Value objects: Profile, Active entry, Settings, Release step, CaseOutcome; and for stacks Provide, Need, Stack, Instance, Resolution, Wiring, Suite, RunId with the pure Docker name builders slug, view-network and private-project.
A profile this addon brought up (or adopted) and still answers for. :profile
is the Profile it ran with, so it can be released after leaving the config.
:needs is the depends_on closure of :services when it is wider (a section
started with no-deps, an adopted one); release spares what any other entry
needs. :programs are the host programs it holds, by program id.
A profile this addon brought up (or adopted) and still answers for. `:profile` is the Profile it ran with, so it can be released after leaving the config. `:needs` is the depends_on closure of `:services` when it is wider (a section started with no-deps, an adopted one); release spares what any other entry needs. `:programs` are the host programs it holds, by program id.
What counts as use of a section: new connections to :nrepl (the shared nREPLs of its programs) and :published (the host ports its containers publish, a browser or any host-side client), and :cpu (a running service above :compose/cpu-busy-percent, busy with no client connected).
What counts as use of a section: new connections to :nrepl (the shared nREPLs of its programs) and :published (the host ports its containers publish, a browser or any host-side client), and :cpu (a running service above :compose/cpu-busy-percent, busy with no client connected).
One instance joining a view network under its original service names.
One instance joining a view network under its original service names.
What the stack plan sums: the caps of each instance, the total capped memory (a shared instance counted once), what one private copy per consumer would have summed, the difference sharing saved, and the instances left out of the sum (unbounded or without a mem cap).
What the stack plan sums: the caps of each instance, the total capped memory (a shared instance counted once), what one private copy per consumer would have summed, the difference sharing saved, and the instances left out of the sum (unbounded or without a mem cap).
A capability name: what a consumer needs and a provider offers, e.g. "kafka", "postgres", "otel". Never a concrete service of another project.
A capability name: what a consumer needs and a provider offers, e.g. "kafka", "postgres", "otel". Never a concrete service of another project.
Caps on one instance's containers. :mem its compose mem_limit, :cpus
its compose cpus (fraction of cores), :jvm? true injects
JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=75 (merged per flag, the consumer's
own flags win); a java image (openjdk, temurin, corretto, clojure ..) is
detected without it, and :jvm? false turns the detection off.
Caps on one instance's containers. `:mem` its compose mem_limit, `:cpus` its compose cpus (fraction of cores), `:jvm?` true injects JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=75 (merged per flag, the consumer's own flags win); a java image (openjdk, temurin, corretto, clojure ..) is detected without it, and `:jvm? false` turns the detection off.
One row of flake history: how case :case/id of suite :suite/id ended in
run :run/id against :project, recorded at :at (epoch ms). :run/sha,
when the runner knows the commit under test, lets a regression name the
first failing commit.
A minimal local shape of what hc-8's run result carries (its Report cases,
ids <suite>/<classname>.<name>), so this layer can be reconciled with it
later without depending on it.
One row of flake history: how case `:case/id` of suite `:suite/id` ended in run `:run/id` against `:project`, recorded at `:at` (epoch ms). `:run/sha`, when the runner knows the commit under test, lets a regression name the first failing commit. A minimal local shape of what hc-8's run result carries (its Report cases, ids `<suite>/<classname>.<name>`), so this layer can be reconciled with it later without depending on it.
How one test case ended in one run, as JUnit XML and TAP report it.
How one test case ended in one run, as JUnit XML and TAP report it.
An agent's declaration that it works on a section (or holds a stack run):
since when, when it was last renewed, what for, and whether the agent was
in the swarm when it claimed (then the claim ends with the agent). A WAVE
claim carries :until (epoch ms): it holds until then whether or not its
owner (an agent or a coordinator) is in the swarm, and ends at once on
release. A stored claim without :until is a plain claim, as before.
An agent's declaration that it works on a section (or holds a stack run): since when, when it was last renewed, what for, and whether the agent was in the swarm when it claimed (then the claim ends with the agent). A WAVE claim carries `:until` (epoch ms): it holds until then whether or not its owner (an agent or a coordinator) is in the swarm, and ends at once on release. A stored claim without `:until` is a plain claim, as before.
A docker compose project name.
A docker compose project name.
Who needs capabilities: a project id, a section id <project>/<target>,
or a suite suite:<id>. Docker names use its slug.
Who needs capabilities: a project id, a section id `<project>/<target>`, or a suite `suite:<id>`. Docker names use its `slug`.
How one consumer is placed in a run: the ONLY network it attaches to, the instances that join it and under which aliases, and which instance answers each capability it needs.
How one consumer is placed in a run: the ONLY network it attaches to, the instances that join it and under which aliases, and which instance answers each capability it needs.
Labels a stack run puts on what it creates (containers, networks), the
authority on ownership over any name: hive.run the RunId, hive.stack
the stack id, hive.instance the Instance id, hive.consumer the
consumer a view network or private instance belongs to.
Labels a stack run puts on what it creates (containers, networks), the authority on ownership over any name: `hive.run` the RunId, `hive.stack` the stack id, `hive.instance` the Instance id, `hive.consumer` the consumer a view network or private instance belongs to.
(explain schema v)nil when v conforms to schema, else humanized problems.
nil when `v` conforms to `schema`, else humanized problems.
Thresholds of hive-compose.promote.flaky, every key optional (defaults in
flaky/defaults). :window is how many of a case's latest runs are
judged, :min-runs how many it needs before it is called anything but
:stable, :flip-rate the share of status changes between consecutive runs
of the window at or above which it is :flaky, and :streak how many
consecutive fails (passes) closing the window make a :regression (a :fixed).
Thresholds of `hive-compose.promote.flaky`, every key optional (defaults in `flaky/defaults`). `:window` is how many of a case's latest runs are judged, `:min-runs` how many it needs before it is called anything but :stable, `:flip-rate` the share of status changes between consecutive runs of the window at or above which it is :flaky, and `:streak` how many consecutive fails (passes) closing the window make a :regression (a :fixed).
What the reaper does to an idle profile. :stop keeps containers, :down removes them (never volumes), :none exempts the profile.
What the reaper does to an idle profile. :stop keeps containers, :down removes them (never volumes), :none exempts the profile.
One running copy of a capability, as resolved for a stack. A shared
instance (:instance/share? true) serves every consumer listed and runs
under the provider's own compose project name (as up of that project
runs it, derived from its dir, not its id); a private one has exactly one
consumer and runs under private-project. :instance/compose-project is
filled by the stack plan and required for a private instance. It joins
each of its consumers' view networks under :instance/aliases, its
original service names. Ids: <provider>/<capability> when shared,
<provider>/<capability>@<consumer> when private.
One running copy of a capability, as resolved for a stack. A shared instance (`:instance/share? true`) serves every consumer listed and runs under the provider's own compose project name (as `up` of that project runs it, derived from its dir, not its id); a private one has exactly one consumer and runs under `private-project`. `:instance/compose-project` is filled by the stack plan and required for a private instance. It joins each of its consumers' view networks under `:instance/aliases`, its original service names. Ids: `<provider>/<capability>` when shared, `<provider>/<capability>@<consumer>` when private.
The caps the stack plan resolved for one instance: :mem in bytes and
:cpus (each absent when no level sets it), :jvm? whether
JAVA_TOOL_OPTIONS is injected (absent: detected from the image),
:unbounded? the explicit opt-out, and :source the level the memory cap
came from.
The caps the stack plan resolved for one instance: `:mem` in bytes and `:cpus` (each absent when no level sets it), `:jvm?` whether JAVA_TOOL_OPTIONS is injected (absent: detected from the image), `:unbounded?` the explicit opt-out, and `:source` the level the memory cap came from.
An Instance as the stack plan runs it: always under a compose project, the
services up names (:instance/needs may widen it to their depends_on
closure once the engine knows it), the labels on what it creates, the view
networks it joins (one per consumer) and the instances of other providers
it must start after.
An Instance as the stack plan runs it: always under a compose project, the services `up` names (`:instance/needs` may widen it to their depends_on closure once the engine knows it), the labels on what it creates, the view networks it joins (one per consumer) and the instances of other providers it must start after.
Docker labels, name to value (see docker-labels).
Docker labels, name to value (see `docker-labels`).
Image digests a stack ran with, by instance id.
Image digests a stack ran with, by instance id.
Memory as bytes (a positive int) or docker's notation: digits with an optional k|m|g|t unit (binary, case-insensitive, optional trailing b): "512m", "2g", "1536M", "64kb".
Memory as bytes (a positive int) or docker's notation: digits with an optional k|m|g|t unit (binary, case-insensitive, optional trailing b): "512m", "2g", "1536M", "64kb".
One capability a consumer requires. :version defaults to "*". :share?
defaults to true: compatible needs of every consumer in a stack share one
instance; false gives this consumer a private instance nobody else uses.
:provider pins a project id when several provide the capability.
:services narrows which of the consumer's services get the wiring (all
by default). :via interposes a capability between consumer and instance
(e.g. :toxiproxy, hc-12); config gives it as a string or keyword.
:resources overrides the Provide's caps on the instance answering it; a
shared instance takes, per key, the largest cap its consumers would have
had alone (a consumer with no cap has no opinion); one consumer's explicit
:unbounded unbounds it.
One capability a consumer requires. `:version` defaults to "*". `:share?` defaults to true: compatible needs of every consumer in a stack share one instance; false gives this consumer a private instance nobody else uses. `:provider` pins a project id when several provide the capability. `:services` narrows which of the consumer's services get the wiring (all by default). `:via` interposes a capability between consumer and instance (e.g. :toxiproxy, hc-12); config gives it as a string or keyword. `:resources` overrides the Provide's caps on the instance answering it; a shared instance takes, per key, the largest cap its consumers would have had alone (a consumer with no cap has no opinion); one consumer's explicit :unbounded unbounds it.
The data of the Result error :compose/over-budget. :basis names the
limit that refused: :stack (:stack/budget), :budget (:compose/budget) or
:host (MemAvailable minus :compose/host-reserve, both then given). :limit
is that limit in bytes, :total-mem the plan's capped sum, :over their
difference; :instances each capped instance by memory, largest first.
The data of the Result error :compose/over-budget. `:basis` names the limit that refused: :stack (:stack/budget), :budget (:compose/budget) or :host (MemAvailable minus :compose/host-reserve, both then given). `:limit` is that limit in bytes, `:total-mem` the plan's capped sum, `:over` their difference; `:instances` each capped instance by memory, largest first.
(private-project provider-project consumer run)The compose project a private instance runs under:
<provider-project>-<slug consumer>-<run>, provider-project being the
provider's own compose project name. RunId holds no -, so two runs never
share a private project; within a run the stack plan refuses collisions.
The compose project a private instance runs under: `<provider-project>-<slug consumer>-<run>`, `provider-project` being the provider's own compose project name. RunId holds no `-`, so two runs never share a private project; within a run the stack plan refuses collisions.
A section or preset. :profile/compose? false (no compose project, only
host programs) together with :profile/services is refused: there is no
compose project to run those services, and up would drop them silently.
A section or preset. `:profile/compose? false` (no compose project, only host programs) together with `:profile/services` is refused: there is no compose project to run those services, and up would drop them silently.
A preset name, or a section id <project>/<target>[+<target>..].
A preset name, or a section id `<project>/<target>[+<target>..]`.
A host process a section needs beside its containers. :program/with pairs
it with compose services: it starts with a section running one of them, or
with every section of its project when it names none. A directory with a
Clojure build file needs no :program/command: the command and the nREPL
port are derived from it (see hive-compose.promote.program).
A host process a section needs beside its containers. `:program/with` pairs it with compose services: it starts with a section running one of them, or with every section of its project when it names none. A directory with a Clojure build file needs no `:program/command`: the command and the nREPL port are derived from it (see `hive-compose.promote.program`).
Where a compose project lives. Its YAML is the source of truth: sections are
resolved from its services, native profiles and depends_on. :project/programs
are the host programs its sections start beside their containers.
:project/provides and :project/needs place it in the capability graph.
:project/compose? false declares a project with no compose file and no
services: its section starts only its programs, which then need be one or
more and pair with no service (:program/with); docker is never called.
Where a compose project lives. Its YAML is the source of truth: sections are resolved from its services, native profiles and depends_on. `:project/programs` are the host programs its sections start beside their containers. `:project/provides` and `:project/needs` place it in the capability graph. `:project/compose? false` declares a project with no compose file and no services: its section starts only its programs, which then need be one or more and pair with no service (`:program/with`); docker is never called.
One capability a project offers. :service is the compose service that
answers it (its depends_on closure comes along). :env is what a consumer
wired to it receives, written with the service's own hostname: instances
join each consumer's view network under their original service names, so
kafka:9092 stays right for shared and private instances alike.
:tenancy names the env var a consumer's namespace prefix (topics,
schemas, buckets) is passed in, so consumers of a shared instance do not
cross-talk. :port is the container port the service answers on; a
consumer needing the capability :via :toxiproxy needs it (hc-12, the
proxy's upstream is <service>:<port>).
One capability a project offers. `:service` is the compose service that answers it (its depends_on closure comes along). `:env` is what a consumer wired to it receives, written with the service's own hostname: instances join each consumer's view network under their original service names, so `kafka:9092` stays right for shared and private instances alike. `:tenancy` names the env var a consumer's namespace prefix (topics, schemas, buckets) is passed in, so consumers of a shared instance do not cross-talk. `:port` is the container port the service answers on; a consumer needing the capability `:via :toxiproxy` needs it (hc-12, the proxy's upstream is `<service>:<port>`).
One step of a plan: act on services of project on behalf of a profile.
One step of a plan: act on `services` of `project` on behalf of a profile.
How a suite reports test cases: JUnit XML, TAP, or :auto (by extension).
How a suite reports test cases: JUnit XML, TAP, or :auto (by extension).
What the pure resolver answers: the instances by id, and for every consumer which instance answers each capability it needs.
What the pure resolver answers: the instances by id, and for every consumer which instance answers each capability it needs.
An Instance as the run-independent resolver answers it: a private one may
lack :instance/compose-project, which the stack plan (knowing the run)
fills with private-project before validating against Instance.
An Instance as the run-independent resolver answers it: a private one may lack `:instance/compose-project`, which the stack plan (knowing the run) fills with `private-project` before validating against Instance.
The input of hive-compose.promote.stack/stack-plan: a Resolution of ResolvedInstances (run-free).
The input of hive-compose.promote.stack/stack-plan: a Resolution of ResolvedInstances (run-free).
Caps, or :unbounded (explicit opt-out: no cap, not summed).
Caps, or :unbounded (explicit opt-out: no cap, not summed).
Names one stack run: 3-40 lowercase letters and digits, no -, so it is
the unambiguous delimiter in the names built from it (view-network,
private-project), and fits the docker label hive.run. Telemetry carries
it as the OTLP resource attribute hive.run.id; services see it as
HIVE_RUN_ID.
Names one stack run: 3-40 lowercase letters and digits, no `-`, so it is the unambiguous delimiter in the names built from it (`view-network`, `private-project`), and fits the docker label `hive.run`. Telemetry carries it as the OTLP resource attribute `hive.run.id`; services see it as HIVE_RUN_ID.
A started Program: the pid leading its process group, where its output goes and, for a Clojure kind, the nREPL port to connect to.
A started Program: the pid leading its process group, where its output goes and, for a Clojure kind, the nREPL port to connect to.
An env value read from a secret store when a process is spawned, never
before, and shown everywhere else as <scheme>:<path>. One entry, its
scheme: {:pass "<store path>"} is the first line of pass <path>. A new
scheme is one more map here and a backend of that id in
hive-compose.adapter.secrets.
An env value read from a secret store when a process is spawned, never
before, and shown everywhere else as `<scheme>:<path>`. One entry, its
scheme: `{:pass "<store path>"}` is the first line of `pass <path>`. A new
scheme is one more map here and a backend of that id in
`hive-compose.adapter.secrets`.(slug s)s as a Docker name part: lower-cased, every char outside [a-z0-9-] made
-, leading and trailing - dropped. Total but lossy ("billing/api" and
"billing-api" share a slug), so the stack plan refuses a run in which two
consumers, or two private instances, share a name.
`s` as a Docker name part: lower-cased, every char outside [a-z0-9-] made
`-`, leading and trailing `-` dropped. Total but lossy ("billing/api" and
"billing-api" share a slug), so the stack plan refuses a run in which two
consumers, or two private instances, share a name.A named set of consumers brought up together with every capability they
need. :stack/needs adds needs of the stack itself (e.g. otel).
:stack/resources overrides caps per capability for this stack, above
every other level. :stack/budget bounds this stack's capped memory
(besides :compose/budget). :stack/priority orders the reaper's pressure
guard: under memory pressure the idle unclaimed stack with the LOWEST
priority is stopped first (default 0).
A named set of consumers brought up together with every capability they need. `:stack/needs` adds needs of the stack itself (e.g. otel). `:stack/resources` overrides caps per capability for this stack, above every other level. `:stack/budget` bounds this stack's capped memory (besides :compose/budget). `:stack/priority` orders the reaper's pressure guard: under memory pressure the idle unclaimed stack with the LOWEST priority is stopped first (default 0).
What hive-compose.promote.stack/stack-plan answers for a Resolution in a run: instances by id, consumers by id, every view network, and the start order (every instance after the instances of other providers its provider is bound to, every consumer after all instances).
What hive-compose.promote.stack/stack-plan answers for a Resolution in a run: instances by id, consumers by id, every view network, and the start order (every instance after the instances of other providers its provider is bound to, every consumer after all instances).
A test runner in any language: a container :suite/image (optional
:suite/command as its args) or a host :suite/command. It needs
capabilities itself (:suite/needs) and runs against :suite/projects.
It writes reports into :suite/reports-dir (inside the container for an
image, else relative to :suite/dir); its exit code is the verdict when
no report is found.
A test runner in any language: a container `:suite/image` (optional `:suite/command` as its args) or a host `:suite/command`. It needs capabilities itself (`:suite/needs`) and runs against `:suite/projects`. It writes reports into `:suite/reports-dir` (inside the container for an image, else relative to `:suite/dir`); its exit code is the verdict when no report is found.
What the last reaper pass saw using a section. A reason is {:claim agent}, {:agent id}, {:port p :peers n :source :nrepl|:published} or {:service s :cpu percent :source :cpu}; :sources names once each what the reasons came from (:claim :agent :nrepl :published :cpu).
What the last reaper pass saw using a section. A reason is {:claim agent},
{:agent id}, {:port p :peers n :source :nrepl|:published} or {:service s
:cpu percent :source :cpu}; :sources names once each what the reasons came
from (:claim :agent :nrepl :published :cpu).The name of a suite's env variant (:suite/variants): one plain id, as it
becomes part of the cell key <suite>@<variant>.
The name of a suite's env variant (`:suite/variants`): one plain id, as it becomes part of the cell key `<suite>@<variant>`.
A provider's concrete version, <major>[.<minor>[.<patch>]] with an
optional suffix: "3.7", "16", "3.7.1-alpine", "1.0.0-rc.1+build.5".
The resolver orders by the numeric part, and a - suffix below the bare
release as semver orders pre-releases; + build suffixes do not order.
A provider's concrete version, `<major>[.<minor>[.<patch>]]` with an optional suffix: "3.7", "16", "3.7.1-alpine", "1.0.0-rc.1+build.5". The resolver orders by the numeric part, and a `-` suffix below the bare release as semver orders pre-releases; `+` build suffixes do not order.
What versions a consumer accepts: "*" (any), an exact or prefix version "3" / "3.7", caret "^3" / "^3.7" (same major), tilde "~3" (same major) / "~3.7" (same minor), or space-separated comparators ">=3.5 <4". Every version in it may carry a Version suffix. Interpreted only by the pure resolver (hive-compose.promote.capability).
What versions a consumer accepts: "*" (any), an exact or prefix version "3" / "3.7", caret "^3" / "^3.7" (same major), tilde "~3" (same major) / "~3.7" (same minor), or space-separated comparators ">=3.5 <4". Every version in it may carry a Version suffix. Interpreted only by the pure resolver (hive-compose.promote.capability).
(view-network run consumer)The view network of consumer in run: hive-<run>-<slug consumer>.
RunId holds no -, so two runs never share a view network.
The view network of `consumer` in `run`: `hive-<run>-<slug consumer>`. RunId holds no `-`, so two runs never share a view network.
A consumer's view network name hive-<run>-<consumer>, slugged
(hive-compose.promote.names/view-network).
A consumer's view network name `hive-<run>-<consumer>`, slugged (hive-compose.promote.names/view-network).
How one consumer is connected in a run. Its view network
view-network is the only network outside its own compose project it
attaches to, so Docker DNS is never ambiguous: its own services still
reach each other on their project's networks, and every instance in
:wiring/attach joins the view network under its aliases, distinct across
the attach list. :wiring/services names which of the consumer's services
attach and get the env (all when absent, as Need :services); the stack
plan refuses an alias that equals one of those services' names. The env is
the providers' :env, HIVE_RUN_ID, tenancy prefixes and OTLP vars;
:wiring/prefix is the consumer's namespace prefix. Secret references
stay references until spawn.
How one consumer is connected in a run. Its view network `view-network` is the only network outside its own compose project it attaches to, so Docker DNS is never ambiguous: its own services still reach each other on their project's networks, and every instance in `:wiring/attach` joins the view network under its aliases, distinct across the attach list. `:wiring/services` names which of the consumer's services attach and get the env (all when absent, as Need `:services`); the stack plan refuses an alias that equals one of those services' names. The env is the providers' `:env`, HIVE_RUN_ID, tenancy prefixes and OTLP vars; `:wiring/prefix` is the consumer's namespace prefix. Secret references stay references until spawn.
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 |