Skip to content

Health check DB probe passes a raw SQL string, which fails under SQLAlchemy 2.x #61

Description

@Aburke225

The database probe in api/routes/health.py executes the literal string "SELECT 1". SQLAlchemy 2.x requires textual SQL to be wrapped in sqlalchemy.text(), so the probe raises and the health check reports the database as down even when it is reachable.

Steps to reproduce: call GET /health with the stack running (or invoke the route handler in a unit test with a live session) and observe the database check failing with ArgumentError: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1').

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

    apiFastAPI backendbugSomething isn't workinggood first issueGood for newcomerstier-1Starter difficulty

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions