litellm/tests/test_litellm/proxy/db
Yucheng Zhu b544023923 fix(observability): report a swallowed Redis outage as an error, not contention
`acquire_lock` caught exceptions to tell a failed attempt from losing the
election, but an outage does not always raise. `RedisCache.async_set_cache`
catches connection errors, records a swallowed-failure marker and returns None,
and None is also how redis reports SET NX losing the race. Both arrived as
`not_acquired`, so a Redis outage was published as ordinary contention: the
distinction the split was added to make, lost in the most important case.

The marker is the only thing that separates them, so it is compared across the
attempt. It is a per-task ContextVar, so a concurrent caller's failure cannot be
misread as this one's. `swallowed_redis_failure_count` exposes it rather than
having callers reach for the private ContextVar.

Verified against a stub that mimics RedisCache exactly: an outage now records
error, losing the race still records not_acquired, and success still records
acquired.
2026-08-19 18:58:37 -07:00
..
db_transaction_queue fix(observability): report a swallowed Redis outage as an error, not contention 2026-08-19 18:58:37 -07:00
mcp_server build(VLLM-Passthrough-with-loadbalancing-support-(enables-using-model-list-for-VLLM-/classify-endpoint)): Closes #11205 2025-05-31 09:00:04 -07:00
conftest.py fix(tests): stop DATABASE_URL env pollution from read-replica tests breaking DB e2e tests (#32653) 2026-07-09 14:37:49 -07:00
test_autorouter_session_rollup.py feat: pre-adoption shadow eval for the auto-router (blind pairwise judge, derived state) (#36587) 2026-08-13 13:15:45 -07:00
test_check_migration.py build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
test_create_views.py fix(proxy): guard every view creation, not just the first and last 2026-08-13 14:41:59 -07:00
test_daily_spend_bulk_upsert.py perf(spend): write each daily spend batch in one upsert statement (#36448) 2026-08-10 17:06:00 -07:00
test_db_pool_metrics.py fix(observability): clear the pending-waiter baseline when the query engine restarts 2026-08-19 16:59:32 -07:00
test_db_spend_update_writer.py Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_fix_spend_deadlock_retry 2026-08-19 14:55:58 -07:00
test_db_url_settings.py fix(tests): stop DATABASE_URL env pollution from read-replica tests breaking DB e2e tests (#32653) 2026-07-09 14:37:49 -07:00
test_exception_handler.py fix(observability): count a pool timeout the engine reports without a code 2026-08-19 16:59:32 -07:00
test_exception_handler_reconnect_retry.py fix(proxy): preserve original transport error if reconnect itself raises 2026-04-28 23:55:46 -07:00
test_gateway_request_tracking.py feat(sgr): make the gateway middleware the source of truth for successful requests (#35717) 2026-08-05 12:40:47 -07:00
test_log_db_metrics.py perf(observability): claim the pool sample atomically so a burst spawns one task 2026-08-19 16:59:32 -07:00
test_prisma_client.py feat(observability): expose Prisma connection pool saturation metrics 2026-08-19 16:59:32 -07:00
test_prisma_planned_engine_restart.py fix(proxy): stop alerting on health probes that lose the planned engine-restart race (#36141) 2026-08-07 09:57:30 -07:00
test_prisma_self_heal.py fix(proxy): only treat a recoverable database outage as grounds to serve without one (#35864) 2026-08-05 14:15:13 -07:00
test_proxy_worker_heartbeat.py fix(proxy): count worker heartbeats on the primary so replica lag cannot undercount 2026-08-14 17:23:06 -07:00
test_query_engine_reaper.py fix(proxy_cli): reap orphaned prisma query-engine processes when a worker dies (#33424) 2026-07-16 13:16:41 -07:00
test_rds_iam_token_expiry.py fix(tests): stop DATABASE_URL env pollution from read-replica tests breaking DB e2e tests (#32653) 2026-07-09 14:37:49 -07:00
test_replica_identity.py feat(db): opt-in REPLICA IDENTITY FULL after prisma migrations (#35267) 2026-07-30 15:45:40 -07:00
test_routing_prisma_wrapper.py feat(observability): expose Prisma connection pool saturation metrics 2026-08-19 16:59:32 -07:00
test_spend_log_batching.py fix(proxy): requeue spend logs when the DB write fails with a transport error (#36716) 2026-08-14 20:49:45 -07:00
test_spend_log_tool_index.py fix(proxy): close the adversarial-review findings on the tool spend rollup 2026-07-26 01:55:47 -07:00
test_tool_registry_writer.py fix(proxy): self-heal startup/reload prisma reads on engine disconnect (#28803) 2026-06-10 20:16:58 +02:00