litellm/tests/test_litellm/proxy/utils/prisma_and_spend
Yassin Kortam 8417b962a2 fix(proxy): recover Prisma DB reconnect loop when client is disconnected
Once the active Prisma client is in the disconnected state, every DB call
raises ClientNotConnectedError. The reconnect machinery was supposed to
recover from this, but _get_engine_pid() inspected the broken client via
prisma's _engine property, which re-raises that same error, so
recreate_prisma_client failed before it could build a replacement client
and the proxy looped on failed reconnects forever (issue #28322 showed
1486+ consecutive failures over 30 days with zero recoveries)

Guard both _get_engine_pid implementations with is_connected() so a
disconnected client reads as "no engine" (pid 0) and the recreate path
proceeds to construct and connect a fresh client
2026-07-07 09:50:27 +03:00
..
__init__.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
_harness_smoke_test.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
conftest.py fix(proxy): support SMTP implicit SSL (port 465) (#30395) 2026-06-13 14:34:43 -07:00
test_cache_user_row.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_config_param_cache.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_password_helpers.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_prisma_client_engine_watcher.py fix(proxy): recover Prisma DB reconnect loop when client is disconnected 2026-07-07 09:50:27 +03:00
test_prisma_client_get_data.py fix(proxy): serialize team budget_limits to JSON in jsonify_team_object (#31045) 2026-06-22 19:10:34 -07:00
test_prisma_client_health.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_prisma_client_lifecycle.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_prisma_client_reconnect.py chore: litellm oss staging (#30745) 2026-06-18 13:55:35 -07:00
test_prisma_client_writes.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00
test_proxy_update_spend.py fix(proxy): isolate poison spend-log rows so one bad record can't drop the whole batch (#31705) 2026-06-30 12:21:14 -07:00
test_send_email.py fix(proxy): support SMTP implicit SSL (port 465) (#30395) 2026-06-13 14:34:43 -07:00
test_spend_functions.py test(proxy/utils): pin PrismaClient and spend-update behavior (#29488) 2026-06-02 17:45:28 -07:00