(fix) ProxyStartup - Check that prisma connection is healthy when starting an instance of LiteLLM (#6627)

* fix debug statements

* fix assert prisma_client.health_check is called on _setup

* asser that _setup_prisma_client is called on startup proxy

* fix prisma client health_check

* add test_bad_database_url

* add strict checks on db startup

* temp remove fix to validate if check works as expected

* add health_check back

* test_proxy_server_prisma_setup_invalid_db
This commit is contained in:
Ishaan Jaff 2024-11-06 17:36:48 -08:00 committed by GitHub
parent 8a2b6fd8d2
commit 373f9d409e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 86 additions and 10 deletions

View file

@ -3052,6 +3052,8 @@ class ProxyStartupEvent:
prisma_client.check_view_exists()
) # check if all necessary views exist. Don't block execution
# run a health check to ensure the DB is ready
await prisma_client.health_check()
return prisma_client