ISuiteRunner over the host and docker (hc-8, hc-16b): one suite runner run to its end under its resource caps, its OOM kill diagnosed, every secret it resolved scrubbed from what it answers.
A host command runs as
systemd-run --user --scope --quiet --unit=hc-suite-<test>-<ms>
-p MemoryMax=<cap> -p MemorySwapMax=0 -- <command>
so a runaway is OOM-killed inside its own scope and cannot take the host
down; the scope's Result (oom-kill) is read after the run and the unit
reset. Without a systemd user manager the command runs under ulimit -v
and the answer's :cap :note says so.
A container runs as docker image inspect, then docker pull when the
image is absent (under its own :pull-timeout-ms, default 10 min, never
the run's), docker create (name, view network, --mount binds, labels,
-e VAR by NAME only, --memory <cap> --memory-swap <cap> --cpus n),
docker network connect to each of :extra-networks, docker start -a
with its output discarded (never drained into this heap) and read back
through docker logs --tail, docker inspect (State.OOMKilled,
ExitCode), then docker rm -f, which also runs after a failed step, a
timeout or a throw. rm -f is never -v: volumes are never removed, so
an image that declares a VOLUME leaves its anonymous volume behind, one
per cell (docker volume ls -f dangling=true lists them).
Env values never reach an argv: secret references in :env are read here,
at spawn, through the injected resolver (hive-compose.adapter.secrets),
and travel in the env of the process (docker copies the named ones in).
Every answer, ok or error, carries :scrub (fn [text]) -> text, which
replaces every value resolved from a reference by that reference's
rendering; the output, the OOM finding and every error message are
already scrubbed.
Everything outside is injected: :exec (hive-system shell.core/exec!
shape: argv, {:dir :env :timeout-ms} -> Result<{:exit :stdout :stderr}>),
:now (epoch ms), :systemd? and :resolver.
ISuiteRunner over the host and docker (hc-8, hc-16b): one suite runner run
to its end under its resource caps, its OOM kill diagnosed, every secret
it resolved scrubbed from what it answers.
A host command runs as
systemd-run --user --scope --quiet --unit=hc-suite-<test>-<ms>
-p MemoryMax=<cap> -p MemorySwapMax=0 -- <command>
so a runaway is OOM-killed inside its own scope and cannot take the host
down; the scope's Result (oom-kill) is read after the run and the unit
reset. Without a systemd user manager the command runs under `ulimit -v`
and the answer's :cap :note says so.
A container runs as `docker image inspect`, then `docker pull` when the
image is absent (under its own `:pull-timeout-ms`, default 10 min, never
the run's), `docker create` (name, view network, `--mount` binds, labels,
`-e VAR` by NAME only, `--memory <cap> --memory-swap <cap> --cpus n`),
`docker network connect` to each of `:extra-networks`, `docker start -a`
with its output discarded (never drained into this heap) and read back
through `docker logs --tail`, `docker inspect` (State.OOMKilled,
ExitCode), then `docker rm -f`, which also runs after a failed step, a
timeout or a throw. `rm -f` is never `-v`: volumes are never removed, so
an image that declares a VOLUME leaves its anonymous volume behind, one
per cell (`docker volume ls -f dangling=true` lists them).
Env values never reach an argv: secret references in `:env` are read here,
at spawn, through the injected resolver (`hive-compose.adapter.secrets`),
and travel in the env of the process (docker copies the named ones in).
Every answer, ok or error, carries `:scrub` (fn [text]) -> text, which
replaces every value resolved from a reference by that reference's
rendering; the output, the OOM finding and every error message are
already scrubbed.
Everything outside is injected: `:exec` (hive-system `shell.core/exec!`
shape: argv, {:dir :env :timeout-ms} -> Result<{:exit :stdout :stderr}>),
`:now` (epoch ms), `:systemd?` and `:resolver`.(create-argv spec cs)The docker create argv of container spec under cs {:mem :cpus}. Not
--rm: the container is inspected after it ends, then removed.
The `docker create` argv of container `spec` under `cs` {:mem :cpus}. Not
--rm: the container is inspected after it ends, then removed.How long a missing image may take to pull.
How long a missing image may take to pull.
A runner with no :timeout-ms of its own may run this long (1 h).
A runner with no :timeout-ms of its own may run this long (1 h).
(env-args env)-e VAR for every variable of env, sorted: names only.
`-e VAR` for every variable of `env`, sorted: names only.
(make-runner opts)SuiteRunner. opts: :exec (default hive-system shell.core/exec!), :now
(default System/currentTimeMillis), :compose/systemd-scope? (default:
whether a systemd user manager answers; false falls back to ulimit -v),
:compose/resolver ({scheme ISecretBackend}, default pass over that exec).
SuiteRunner. `opts`: :exec (default hive-system `shell.core/exec!`), :now
(default `System/currentTimeMillis`), :compose/systemd-scope? (default:
whether a systemd user manager answers; false falls back to ulimit -v),
:compose/resolver ({scheme ISecretBackend}, default `pass` over that exec).(mount-args mounts)--mount type=bind,... per mount: unlike -v, a : in a path is no separator.
`--mount type=bind,...` per mount: unlike `-v`, a `:` in a path is no separator.
(run-command! {:keys [exec now systemd?]} spec resolved scrub)Run the host command of spec under its caps, its env resolved.
Run the host command of `spec` under its caps, its env `resolved`.
(run-container! {:keys [exec now]} spec resolved scrub)Run the container of spec under its caps, its env resolved.
Run the container of `spec` under its caps, its env `resolved`.
(start-argv container)docker start -a, its output discarded: it is unbounded, and read back
through docker logs --tail instead.
`docker start -a`, its output discarded: it is unbounded, and read back through `docker logs --tail` instead.
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 |