Skip to content

Deploy Production blocked: alembic upgrade fails with missing greenlet #2965

Description

@JoshCLWren

Problem

Deploy Production on main is failing in Migrate Neon and deploy exact main SHA at alembic upgrade head. Production is not getting new tip SHAs until this is fixed.

CI and Main Health Gate on tip are green; this is deploy-path only.

Error

ModuleNotFoundError: No module named 'greenlet'
ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' library is installed.
  ... use the 'sqlalchemy[asyncio]' install target: 'pip install sqlalchemy[asyncio]'

Fails while importing app.models → app.database → sqlalchemy.ext.asyncio during Alembic env load.

Evidence

Likely area (verify; do not treat as prescription)

Deploy workflow’s locked runtime install for the migrate step may be missing greenlet / sqlalchemy[asyncio] after a dependency or Python-version change. Check pyproject.toml / lockfile / deploy-production migrate job install steps versus what alembic/env.py imports.

Acceptance criteria

  • alembic upgrade head succeeds in the Deploy Production migrate job with the same install path GHA uses (greenlet available to SQLAlchemy asyncio).
  • A subsequent Deploy Production run on current main completes migrate + deploy (or skips deploy only via the intended exact-SHA dedupe path, not migrate failure).
  • Lockfile / dependency declaration updated so greenlet cannot drop out of the migrate environment again.
  • Regression coverage or CI assertion that the migrate/runtime install set includes greenlet (or equivalent sqlalchemy[asyncio] extras) so this fails in PR CI before main deploy.
  • No change to factory roster / free-model TSV as part of this fix.

Out of scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend implementationbugSomething isn't workingci-infrastructuredatabaseDatabase/model changesfactoryWork owned or produced by an autonomous ComicPile factoryfactory:localCurrent next-action owner is the local OpenCode factoryfactory:reviewThe exact current head needs review or re-reviewralph-priority:highralph-status:in-reviewralph-taskAn independently executable implementation task

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions