fix: add psycopg2-binary to runtime deps (CAR-1422) #20

Merged
Barcode Betty merged 1 commits from betty/car-1422-psycopg2-binary into dev 2026-06-22 23:11:28 +00:00
Member

Root cause

Alembic upgrade head uses engine_from_config with a synchronous postgresql:// URL from alembic.ini. SQLAlchemy requires psycopg2 (or psycopg2-binary) as the sync driver.

The old 2026.06.08 image inherited psycopg2-binary 2.9.12 transitively from cartsnitch-common. The standalone image does not have cartsnitch-common, so the driver is missing — causing ModuleNotFoundError: No module named 'psycopg2' and immediate pod CrashLoopBackOff.

Change

Add psycopg2-binary>=2.9 to [project].dependencies in pyproject.toml.

Unblocks

CAR-1422 / CAR-1211 UAT receipt path verification.

## Root cause Alembic `upgrade head` uses `engine_from_config` with a synchronous `postgresql://` URL from `alembic.ini`. SQLAlchemy requires `psycopg2` (or `psycopg2-binary`) as the sync driver. The old `2026.06.08` image inherited `psycopg2-binary 2.9.12` transitively from `cartsnitch-common`. The standalone image does not have `cartsnitch-common`, so the driver is missing — causing `ModuleNotFoundError: No module named 'psycopg2'` and immediate pod CrashLoopBackOff. ## Change Add `psycopg2-binary>=2.9` to `[project].dependencies` in `pyproject.toml`. ## Unblocks CAR-1422 / CAR-1211 UAT receipt path verification.
Barcode Betty added 1 commit 2026-06-22 23:09:54 +00:00
fix: add psycopg2-binary to runtime deps (CAR-1422)
CI / test (pull_request) Successful in 9s
CI / lint (pull_request) Successful in 4s
CI / deploy-dev (pull_request) Has been skipped
CI / build-and-push (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
CI / grype (pull_request) Has been skipped
87a7d63aeb
alembic upgrade head uses SQLAlchemy sync engine with postgresql:// URL,
which requires psycopg2. The old image had it via cartsnitch-common;
standalone image needs it explicit.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Barcode Betty merged commit 6451058f7d into dev 2026-06-22 23:11:28 +00:00
Sign in to join this conversation.