You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fastapi-sqlalchemy-pg-catalog/app: wrap create_all in the lifespan try/finally
Copilot noted that the previous try/finally only covered the yield,
so a failure in create_all (the *exact* failure mode this repro
demonstrates: pre-fix keploy makes create_all raise
psycopg2.DatabaseError) wouldn't reach the finally and the engine
pool would leak. Moved the startup logging + create_all call inside
the try block; finally now runs regardless of where the failure
occurs.
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
0 commit comments