Skip to content

test: docker-compose + containerless harness for the master HTTP surface - #171

Merged
beinan merged 2 commits into
mainfrom
test-harness
Jul 22, 2026
Merged

test: docker-compose + containerless harness for the master HTTP surface#171
beinan merged 2 commits into
mainfrom
test-harness

Conversation

@beinan

@beinan beinan commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a runnable test environment + harness so the master's rollout-record HTTP
surface — in particular the ?source=fragments|wal|all selector shipped in #170
can be exercised end to end. That path is only reachable with a live etcd + object
store, so its integration test is #[ignore]d and never runs in CI; this closes
that gap.

Two interchangeable ways to bring the same stack up (etcd + master + worker(s),
shared DATA_DIR):

  • Docker Compose (test/docker-compose.yml + single multi-stage test/Dockerfile):
    MinIO-backed s3://lance-context shared by master + two workers. WAL self-merge
    disabled so the source split is observable.
  • Containerless (test/harness/native-*.sh): same stack as plain host processes
    (static etcd binary, local-filesystem DATA_DIR, cargo-built binaries) for
    sandboxes where the kernel forbids unshare/netlink and no container can start.

test/harness/smoke.sh makes real HTTP calls and asserts: fragments=0, wal=3,
all=3 before any merge; response echoes the resolved source; default (no param) =
fragments; unknown source → HTTP 400.

Files

  • test/Dockerfile — multi-stage (ui → builder → master/worker)
  • test/docker-compose.yml — MinIO + etcd + master + 2 workers
  • test/harness/{up,down,smoke}.sh — Docker path + shared smoke assertions
  • test/harness/native-{up,down}.sh — containerless path
  • test/harness/README.md, .dockerignore

Test plan / what was actually verified

  • Containerless path run locally and PASSES all smoke assertions (real
    etcd + master + worker over HTTP): fragments=0 / wal=3 / all=3,
    default→fragments, unknown source→400.
  • UI builds (npm run build); compose YAML parses; all shell scripts bash -n clean.
  • Docker Compose path: statically validated only — not run end to end here
    because this sandbox's kernel blocks container startup
    (unshare: operation not permitted). Needs a runner with a working
    container runtime to exercise up.sh && smoke.sh.

🤖 Generated with Claude Code

beinan and others added 2 commits July 22, 2026 21:13
Bring up the full control-plane + data-plane stack (MinIO, etcd, master,
two workers) so the real HTTP surface can be exercised end to end. This
closes the coverage gap for the record-list source selector
(?source=fragments|wal|all, PR #170), which is only reachable through
live etcd + object store and is otherwise #[ignore]d in CI.

- test/Dockerfile: single multi-stage build (ui -> builder -> master/worker)
- test/docker-compose.yml: MinIO-backed s3://lance-context DATA_DIR shared
  by master + workers; WAL self-merge disabled so source split is observable
- test/harness/{up,down,smoke}.sh: bring up/tear down + assert source
  semantics over HTTP (fragments=0, wal=3, all=3 before merge; default=
  fragments; unknown source -> 400)
- test/harness/README.md: usage + manual curl recipes for agents
- .dockerignore: keep build context small

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Some environments have a Docker daemon but a kernel that forbids
unshare/netlink, so no container can start (docker run fails with
"failed to register layer: unshare: operation not permitted"). Add a
native-process variant of the same stack so the source-selector HTTP
surface can still be validated end to end:

- native-up.sh: downloads a static etcd, builds the two binaries, and
  runs etcd + lance-context-server + lance-context-master as host
  processes over a local-filesystem DATA_DIR (no MinIO). --smoke chains
  smoke.sh.
- native-down.sh: stop processes (+ --purge to wipe state).
- README: document containerless mode.

Verified locally: native-up.sh --smoke passes all assertions
(fragments=0, wal=3, all=3 before merge; default=fragments; unknown
source -> 400).

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@beinan
beinan merged commit 3743460 into main Jul 22, 2026
@beinan
beinan deleted the test-harness branch July 22, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant