Skip to content

v0.8.1 - the compose fleet actually comes up

Choose a tag to compare

@github-actions github-actions released this 30 Jul 11:59
· 4796 commits to main since this release
8474d98

Scaled mode's compose deployment actually works now. 0.8.0 shipped a docker-compose.scaled.yml that did not come up. Embedded mode is unaffected — if you run a nest or a roost, 0.8.0 was and is fine, and this changes nothing for you.

In-place safe from 0.8.0 and 0.7.x: no data migration, no config changes.

Why this release exists

The fleet was built and tested — 41 tests against a live Postgres, all six of RFC-0022's acceptance criteria — and then we brought the compose stack up for the first time and it failed four different ways. None of the four was findable by any test we had.

If you are running scaled mode from 0.8.0, upgrade. One of these is a genuine concurrency bug affecting every deployment, not just the compose path.

1. Migration race (the real bug)

ERROR: duplicate key value violates unique constraint "pg_namespace_nspname_index"
DETAIL: Key (nspname)=(nuthatch_control) already exists.

Neither CREATE SCHEMA IF NOT EXISTS nor CREATE TABLE IF NOT EXISTS is atomic in Postgres. The control plane and every worker migrate at startup, so they race, and one dies. This affects any deployment where those processes start together — which is all of them, not only compose.

Both migrations now take an advisory lock, released even on failure so a bad startup cannot wedge the fleet behind a lock nobody is holding for a reason.

Invisible to every single-process test, which is why 41 green tests missed it.

2. The control plane could not start under compose

Error: refusing to serve the control-plane API on '0.0.0.0:8290' without a token

Docker publishes a port by binding 0.0.0.0 inside the container, so the token guard always fired. The compose file claimed the host-side 127.0.0.1 mapping made a token unnecessary. It doesn't. The guard was right; the config was wrong about it. Compose now sets a development-default token you should change.

3. The FE could not start on a read-only mount

Error: failed to open redb at /nest/nuthatch.redb
Caused by: I/O error: Read-only file system (os error 30)

The FE still opens the nest's local redb to rebuild its serving views — a known limitation of RFC-0022 slice 3 that the compose file then contradicted by mounting :ro. Dropped, with a note to restore it when slice 3b moves the view rebuilds onto the HotStore trait.

4. The fleet needs a ./nest directory, and nothing said so

Writers survive without it because they take work from the control plane; FE nodes die because they load config and views from disk. The asymmetry is what made it baffling. Now documented in the compose header.

What the fleet has now actually done

Brought up on a single host — Postgres, control plane, 2 writers, 2 FE nodes — and walked through docs/verification.md level 5:

  • workers registering with distinct ids
  • a nest declared over HTTP and picked up within a tick
  • exactly one owner for the cursor, not two
  • failover: killed the owner, the survivor took it after the lease expired
  • fleet-wide version pinning, read back as servable
  • write-only secrets, with a canary absent from every file on disk

Still unverified, and stated rather than glossed: nothing has run across real machines. Clock skew and network partitions are untested, and that is the one place outside verification is worth the most.

Also

docs/verification.md (new in this release cycle) is an acceptance runbook: every step has a command, an expected result, what it proves, and what a failure means. It says plainly which levels we have verified ourselves. Worth walking before go-live, and worth handing to a second operator.

Verifying the download

curl -fsSLO https://github.com/nuthatch-indexer/nuthatch/releases/download/v0.8.1/nuthatch-x86_64-unknown-linux-gnu.tar.gz
curl -fsSLO https://github.com/nuthatch-indexer/nuthatch/releases/download/v0.8.1/nuthatch-x86_64-unknown-linux-gnu.tar.gz.sha256
sha256sum -c nuthatch-x86_64-unknown-linux-gnu.tar.gz.sha256
Artifact Contains
nuthatch-x86_64-unknown-linux-gnu.tar.gz · :0.8.1 · :latest embedded — no database driver
nuthatch-scaled-x86_64-unknown-linux-gnu.tar.gz · :0.8.1-scaled scaled — worker, control, serve --hot-store

Scaled mode needs the -scaled artifact. worker and control appear in the default binary's --help — the CLI surface is shared — but running either returns a refusal naming the feature flag.