mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(proxy-extras): skip post-deploy sanity check when no migrations pending
When prisma migrate deploy reports 'No pending migrations to apply' the DB already matches schema — running _resolve_all_migrations (migrate diff + prisma db execute) adds 25+ seconds unnecessarily, causing the proxy to miss the 90-second startup timeout in test_litellm_proxy_server_config_no_general_settings.
This commit is contained in:
parent
e073feec0a
commit
e6a20af646
1 changed files with 8 additions and 0 deletions
|
|
@ -418,6 +418,14 @@ class ProxyExtrasDBManager:
|
|||
|
||||
logger.info("prisma migrate deploy completed")
|
||||
|
||||
# Skip sanity check when deploy reports no pending migrations —
|
||||
# DB already matches schema, no drift to correct.
|
||||
if "No pending migrations to apply" in result.stdout:
|
||||
logger.info(
|
||||
"No pending migrations — skipping post-migration sanity check"
|
||||
)
|
||||
return True
|
||||
|
||||
# Run sanity check to ensure DB matches schema
|
||||
logger.info("Running post-migration sanity check...")
|
||||
ProxyExtrasDBManager._resolve_all_migrations(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue