Skip to content

build(compose): put the vector stores behind a profile and add healthchecks - #595

Merged
williedoran-neo4j merged 3 commits into
neo4j:mainfrom
williedoran-neo4j:willie/examples-compose-profiles
Aug 12, 2026
Merged

build(compose): put the vector stores behind a profile and add healthchecks#595
williedoran-neo4j merged 3 commits into
neo4j:mainfrom
williedoran-neo4j:willie/examples-compose-profiles

Conversation

@williedoran-neo4j

@williedoran-neo4j williedoran-neo4j commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

First of the PRs replacing #591, which was too large to review as one change.

tests/e2e/docker-compose.yml starts Neo4j, Weaviate, its vectorizer and Qdrant unconditionally. Anyone who only wants Neo4j — which is most of the examples, and much of local development — pays for four containers and a model download.

What changed

  • The vector stores move behind a vectordb profile. The default is Neo4j with APOC; --profile vectordb adds the rest.
  • Healthchecks, so up --wait blocks until the services actually answer rather than merely start. CI currently polls readiness by hand for want of them.
  • Pinecone Local, an in-memory emulator that ignores API keys, so the Pinecone examples no longer need a hosted account.

The one service without a healthcheck is pinecone-local: its image ships no shell and no binary a healthcheck could run. I verified that by probing the image rather than assuming it, and the file header says so.

The t2v-transformers healthcheck uses python3 because that image has neither wget nor curl — also verified by running it; its ready endpoint answers 204, which urlopen treats as success.

Callers updated

No workflow references this file — only docs do — so the blast radius is documentation:

  • README.md and docs/source/index.rst (the e2e instructions now pass --profile vectordb)
  • the Qdrant and Weaviate per-store example READMEs

Teardown needs --profile '*'. docker compose down only removes services in the active profiles, so running it bare after starting --profile vectordb leaves four containers up and fails to remove the network with "Resource is still in use". --profile '*' matches every profile and tears down whatever you started. The docs say so.

Verification

Run against the real thing, not just config-validated:

  • up -d --wait on the default profile: neo4j alone, healthy, exit 0.
  • up -d --wait --profile vectordb: all five healthy in ~11s, exit 0. pinecone-local reports no (healthy) marker, as expected for a container with no healthcheck.
  • Each service probed functionally rather than trusted: Neo4j over bolt with 174 APOC procedures resolved, Weaviate /v1/.well-known/ready 200, Qdrant 200, Pinecone Local 200.
  • The full e2e suite against this stack: 101 passed, 1 skipped (excluding the SEARCH-clause tests, which use the separate Neo4j 2026 compose file).
  • --profile '*' down leaves zero containers and removes the network.

The Neo4j healthcheck was the one real risk — it was written against neo4j:5-enterprise and is applied here to this file's incumbent neo4j:enterprise. Confirmed wget is present and the check passes on that image.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated (run against the new stack; no test changes needed)
  • Examples have been updated
  • New files have copyright header (no new files)
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

🤖 Generated with Claude Code

williedoran-neo4j and others added 2 commits August 12, 2026 09:18
…checks

The e2e stack starts Neo4j, Weaviate, its vectorizer and Qdrant unconditionally,
so anyone who only wants Neo4j - which is most of the examples and much of local
development - pays for four containers and a model download.

Move the vector stores behind a `vectordb` profile, so the default is Neo4j with
APOC and `--profile vectordb` adds the rest. Add healthchecks so `up --wait`
blocks until the services actually answer, rather than merely start; CI currently
polls readiness by hand for want of them.

Also adds Pinecone Local, an in-memory emulator that ignores API keys, so the
Pinecone examples no longer need a hosted account. It ships no shell and no
binary a healthcheck could run, which the file header notes.

Callers that need the stores now pass --profile vectordb: the README, the docs
and the Qdrant and Weaviate example READMEs are updated to match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`docker compose down` only removes services in the active profiles, so running it
without one after starting `--profile vectordb` leaves four containers up and
fails to remove the network with "Resource is still in use".

`--profile '*'` matches every profile, so it tears down whatever you started.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@williedoran-neo4j
williedoran-neo4j force-pushed the willie/examples-compose-profiles branch from 014433e to 99c791f Compare August 12, 2026 07:21

@AmirLayegh AmirLayegh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!
Left a couple of nits below but nothing blocking.

Comment thread tests/e2e/docker-compose.yml Outdated
Comment thread tests/e2e/docker-compose.yml Outdated
Address review feedback on neo4j#595.

The neo4j healthcheck was probing the HTTP console (7474), but the e2e
suite talks to Neo4j over bolt (7687). Switch to cypher-shell, which
ships in the image and defaults to bolt, so the check validates what
actually matters. Verified live: passes with the real credentials
(returns a row), fails with a wrong password.

The qdrant healthcheck was a bare TCP-connect probe. Checked the real
qdrant/qdrant image directly rather than assuming: it has no wget, curl,
nc or python3 (qdrant/qdrant#3491 tracks this upstream), so a literal
wget-based check - the obvious fix - would fail every time. It also
turns out CMD-SHELL runs via /bin/sh, which is dash in this image and
can't do /dev/tcp redirection at all, unlike the bash it's wrapped in
today. So the check now sends a real HTTP GET for /healthz over
/dev/tcp inside an explicit bash -c. Verified live with a real
docker compose up --wait against the image, and with a negative control
(pointed the probe at a dead port) that correctly reports unhealthy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@williedoran-neo4j
williedoran-neo4j merged commit 099d140 into neo4j:main Aug 12, 2026
11 checks passed
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.

2 participants