-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
Running pytest locally fails during test setup with sqlalchemy.exc.NoSuchTableError: asset when sync_search_vector_triggers runs after schema recreation.
Environment
- Local PostgreSQL with PostGIS
- Tests work in CI (PostGIS Docker container)
Error
tests/conftest.py:47: in _setup_test_db
_sync_search_vectors()
...
sqlalchemy.exc.NoSuchTableError: asset
Steps to Reproduce
- Have local PostgreSQL with PostGIS
- Run
uv run pytest tests/test_thing.py -v - Test setup fails at
sync_search_vector_triggers
Analysis
The conftest.py test setup:
recreate_public_schema()- drops and recreates schemaalembic upgrade head- runs migrations (completes successfully per logs)sync_search_vector_triggers()- fails because it can't findassettable
The migrations report completion but the subsequent sync function can't see the tables. This may be:
- Connection pooling/caching issue
- Transaction isolation issue
- Engine not refreshed after schema recreation
Workaround
CI tests pass, so pushing and letting CI validate is the current workaround.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels