Skip to content

Fix alembic migration path resolution#148

Merged
danielmillerp merged 1 commit intomainfrom
dm/fix-alembic-path
Feb 18, 2026
Merged

Fix alembic migration path resolution#148
danielmillerp merged 1 commit intomainfrom
dm/fix-alembic-path

Conversation

@danielmillerp
Copy link
Collaborator

@danielmillerp danielmillerp commented Feb 18, 2026

Summary

  • Fix env.py project root path from ../../../.. (resolves to /) to ../../.. (resolves to /app)
  • This was causing ModuleNotFoundError: No module named 'src' at pod startup, preventing alembic upgrade head from running
  • As a result, the checkpoints table (from migration d1a6cde41b3f) was never created on AWS dev, breaking LangGraph agents

Context

The OTel auto-instrumentation init container overrides PYTHONPATH to /otel-auto-instrumentation-python/..., so the Dockerfile's ENV PYTHONPATH=/app is lost. env.py compensates by explicitly adding the project root to sys.path, but was resolving 4 levels up (/) instead of 3 (/app).

Test plan

  • Verify alembic upgrade head runs successfully on pod startup (check logs for Added /app to Python path and Migration completed successfully)
  • Verify checkpoints table exists after deployment
  • Verify LangGraph agents can use the checkpoint endpoint without 500 errors

🤖 Generated with Claude Code

@danielmillerp danielmillerp requested a review from a team as a code owner February 18, 2026 00:32
@danielmillerp danielmillerp changed the title Fix alembic env.py project root path for migrations Fix alembic migration path resolution Feb 18, 2026
@danielmillerp danielmillerp merged commit 7dce273 into main Feb 18, 2026
27 checks passed
@danielmillerp danielmillerp deleted the dm/fix-alembic-path branch February 18, 2026 00:38
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.

3 participants