|
| 1 | +--- |
| 2 | +status: resolved |
| 3 | +trigger: "GH Actions release pipeline failed after publishing tag: ModuleNotFoundError: No module named 'qdrant_client' while collecting tests/test_qdrant_helpers.py and tests/test_qdrant_wrapper.py" |
| 4 | +created: "2026-05-15" |
| 5 | +updated: "2026-05-15" |
| 6 | +--- |
| 7 | + |
| 8 | +# Debug Session: Release Pipeline Missing Qdrant |
| 9 | + |
| 10 | +## Symptoms |
| 11 | + |
| 12 | +- Expected behavior: The tag-triggered release pipeline should run the pre-publish test gate successfully before building and publishing artifacts. |
| 13 | +- Actual behavior: The Release workflow `build` job failed during pytest collection because `qdrant_client` was not installed. |
| 14 | +- Error messages: `ModuleNotFoundError: No module named 'qdrant_client'` from `tests/test_qdrant_helpers.py` and `tests/test_qdrant_wrapper.py`. |
| 15 | +- Timeline: First observed when checking GitHub Actions after publishing a tag. |
| 16 | +- Reproduction: Push a `v*` tag so `.github/workflows/release.yml` runs and executes `python -m pytest` after installing only `".[dev]" build`. |
| 17 | + |
| 18 | +## Current Focus |
| 19 | + |
| 20 | +- hypothesis: The release workflow runs all tests but installs only development tooling, not optional extras required by default-collected integration tests. |
| 21 | +- test: Inspect release workflow install command and Qdrant tests' import behavior. |
| 22 | +- expecting: `release.yml` installs `".[dev]"`, while Qdrant tests import `qdrant_client` at module import time. |
| 23 | +- next_action: Install Qdrant/FastAPI extras in the release pre-publish test environment and lock the workflow contract in tests. |
| 24 | + |
| 25 | +## Evidence |
| 26 | + |
| 27 | +- timestamp: 2026-05-15 |
| 28 | + finding: `.github/workflows/release.yml` installed `".[dev]" build`, then ran `python -m pytest`. |
| 29 | +- timestamp: 2026-05-15 |
| 30 | + finding: `pyproject.toml` defines `dev` as pytest tooling only and defines `qdrant` separately as `qdrant-client>=1.7`. |
| 31 | +- timestamp: 2026-05-15 |
| 32 | + finding: `tests/test_qdrant_helpers.py` and `tests/test_qdrant_wrapper.py` import `qdrant_client` during module collection, so a missing dependency is a collection error rather than a skipped test. |
| 33 | +- timestamp: 2026-05-15 |
| 34 | + finding: `tests/test_fastapi.py` skips when FastAPI/httpx are missing, but installing the `fastapi` extra in the release gate lets that integration coverage run too. |
| 35 | +- timestamp: 2026-05-15 |
| 36 | + finding: After installing Qdrant locally, focused tests exposed `NameError: name 'inspect' is not defined` in `ensure_collection()`. |
| 37 | + |
| 38 | +## Eliminated |
| 39 | + |
| 40 | +- hypothesis: Trusted Publishing failed. |
| 41 | + reason: The failure occurred in the `build` job before artifact publishing jobs. |
| 42 | +- hypothesis: The package forgot to declare the Qdrant extra. |
| 43 | + reason: `pyproject.toml` declares `qdrant = ["qdrant-client>=1.7"]`. |
| 44 | + |
| 45 | +## Resolution |
| 46 | + |
| 47 | +- root_cause: Release workflow test environment did not install optional extras required by tests included in the full pytest suite. |
| 48 | +- fix: Changed release workflow install command to `python -m pip install ".[dev,qdrant,fastapi]" build` and imported `inspect` in `corpulse/integrations/qdrant.py`. |
| 49 | +- verification: Run release workflow contract test and Qdrant/FastAPI tests locally. |
| 50 | +- files_changed: |
| 51 | + - `.github/workflows/release.yml` |
| 52 | + - `corpulse/integrations/qdrant.py` |
| 53 | + - `tests/test_release_workflow.py` |
| 54 | + - `.planning/debug/release-pipeline-missing-qdrant.md` |
0 commit comments