From e6a20af6469f5d2ea85979737d3a7a063ba441b6 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 17 Apr 2026 15:59:41 -0700 Subject: [PATCH] fix(proxy-extras): skip post-deploy sanity check when no migrations pending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- litellm-proxy-extras/litellm_proxy_extras/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/litellm-proxy-extras/litellm_proxy_extras/utils.py b/litellm-proxy-extras/litellm_proxy_extras/utils.py index 2aff506685b..c24188cba1d 100644 --- a/litellm-proxy-extras/litellm_proxy_extras/utils.py +++ b/litellm-proxy-extras/litellm_proxy_extras/utils.py @@ -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(