The integration test job has been failing intermittently on main and on
open pull requests with `httpx.ReadTimeout: timed out` on the first write
to Qdrant, while `GET /collections` and `/healthz` kept answering.
Cause: the qdrant-client default request timeout is 5 seconds, and the job
only waits for `/healthz`, which is served before the storage engine
accepts writes. On a shared runner doing several builds at once, the first
collection creation or indexing exceeds 5s and the whole fixture errors
out.
- pin qdrant/qdrant to v1.19 (the digest `latest` and the cluster already
run) and let Renovate track the pin in the workflows as well
- wait for a real write round-trip (create + delete a probe collection)
instead of `/healthz` alone, and dump the container logs if it never
becomes writable
- make the Qdrant client timeout configurable via QDRANT_TIMEOUT and set
it to 60s in CI, where there is no latency SLA
The "make indexer importable without env" refactor (e32806a, merged via PR
#52 on 2026-10-09) removed EMBEDDING_MODEL_NAME, BATCH_SIZE and
EMBEDDING_BATCH_SIZE from the module scope while main() kept referencing
them, so every indexer run died before reaching Qdrant:
File "/app/src/indexer.py", line 264, in main
print(f"Loading embedding model: {EMBEDDING_MODEL_NAME}...")
NameError: name 'EMBEDDING_MODEL_NAME' is not defined
CI never caught it because no test executes main(). Both *-indexer cronjobs
have been failing (BackoffLimitExceeded) since 2026-10-16, i.e. the first
run after the image pin moved to v0.0.22-latest.
- restore the three constants with their pre-refactor defaults
- cover them in tests/test_indexer.py and cross-check that the indexer
embeds with the same model as server.py (vectors must stay comparable)
- add a ruff F821 gate to the unit job so undefined names fail CI
Fixes mcp-maildir-cabilloteu-indexer and mcp-maildir-gmail-indexer.
Two concurrent jobs (docker-build + PR Checks on the same push) both
used container name 'qdrant'; the second job's 'docker rm -f qdrant'
destroyed the first job's Qdrant mid-run, so the test collection 404'd.
Name is now qdrant-${{ github.run_id }} everywhere (cleanup included).
- pr.yaml: new pytest job (unit tests only, integration deselected by marker)
- main.yaml / cron.yaml / tag.yaml: replace the build-only 'test' job with a
real pytest unit job + an integration-test job that starts a Qdrant
container sharing the job container's network namespace
(--network container:$(hostname) — bypasses the Gitea runner bug with
service containers), waits for /healthz, runs 'pytest -m integration',
then tears down.
- build/build-push jobs now require [test, integration-test]; previously
'test' was only a docker build and pytest never ran in CI.
- integration-test first cleans up any stale qdrant container (rerun-safe).
- setup-python SHA aligned with docker-build.yaml (v7, python 3.13/3.14).