Skip to content

@edgehero/pi-dispatch v1.10.0

Choose a tag to compare

@github-actions github-actions released this 02 Sep 14:18
· 61 commits to main since this release

The container backend becomes a named, declared seam (#227). An existing deployment is unaffected: local is still the only backend, and a worker that sets neither new variable produces a byte-identical docker run argv.

Configuration

Variable What it does
PI_BACKENDS which backends this deployment blesses (default: local)
PI_BACKEND_FLOOR the minimum every one must declare, as property=word pairs

Both env-only. Every malformed part refuses rather than being skipped: an unknown backend name, a pair with no =, an unknown property name, an unknown word, a property named twice. A floor the parser cannot read must never become one it reads as asking for nothing.

Triggers

run.backend names the venue. Refused at load for an unknown name or a bad charset, and refused pre-spend for a name this deployment does not bless, ahead of the image inspect, the mint, the clone and the reservation. A near-miss spelling is refused too, including the plural run.backends: a dropped venue runs the job somewhere else while the file reads as though it chose.

A remote venue on a cron or local trigger is refused permanently. The operator's own folder has to be bind-mounted and edited in place.

Internals worth knowing if you extend it

stopContainer and reap are backend functions now, not literals in the worker. makeBackendRegistry resolves every per-job function through one lookup, so the abort stops the container in the venue that built it. reap's tri-state is unchanged and still gates the scope-claim sweep: reaped: true means this host has established it holds no job containers, and one venue that could not enumerate makes the whole answer unproven.

Docker's 125/126/127 are backend-declared rather than assumed, because they collide with the runner's own exit channel.

After an abort, the wait is bounded. If the stop does not take, the job's slot, lease and budget reservation are released rather than held forever, and stop_did_not_take says so.

For adapter authors

docs/backends.md is the contract. @edgehero/pi-dispatch/backend-conformance exports a suite you run against your own backend; @edgehero/pi-dispatch/container-spec gives you the mounts as transfers, with the read-only downgrade a copying runtime takes stated rather than hidden.