litellm/tests/integration/database
paveln83 b4918c9a05
fix(proxy): start and serve the proxy with a database on Python 3.10 and prisma 0.13+ (#54416)
* fix(proxy): start the Prisma engine on Python 3.10 and pin prisma to the versions it supports

The port-owning query engine waited with asyncio.timeout, which only exists on Python 3.11+, so a proxy with a database could not start on 3.10. It now waits with asyncio.wait_for

The engine subclass imports prisma.builder, which prisma 0.13 removed, so extra_proxy now allows prisma>=0.11.0,<0.13. prisma 0.12.0 passes the engine tests on 3.10

A fake query engine executable covers the connect, silent, and early-exit paths, and a new prisma-engine-python-310 CI shard runs those tests on Python 3.10 whenever the engine code changes

* fix(proxy): run the Prisma engine on prisma 0.13+ and fix Python 3.10 chat with a database

Drop the prisma<0.13 cap and make the engine subclass work on prisma 0.11 through 0.15. OVERWRITE_DATASOURCES is built with json.dumps instead of the removed prisma.builder, and the client's HTTP options reach the engine as http_config when its constructor takes it

Build CallContext without the subscripted alias, which raised TypeError on Python 3.10 for every chat call with a database

Move the engine tests that start a real process to tests/integration/database, and have the Python 3.10 CI shard install prisma 0.15.0 and run the dispatcher tests too

* fix(proxy): set the Prisma client engine through its setter so prisma 0.15 connects

* test(proxy): run the query engine spawn path in-process on Python 3.10

* fix(proxy): keep TimeoutError as the cause of the query engine connect timeout

The connect timeout EngineConnectionError chains the TimeoutError again, as on the merge base, so the startup traceback keeps its direct cause block

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-26 00:09:17 +00:00
..
image fix(docker): disable Prisma's update check so it stops leaving zombie processes (#52642) 2026-11-18 14:38:13 -08:00
migrations test(migrations): read the killed deploy's attempt clock before its session opens (#54340) 2026-11-25 03:08:02 +00:00
test_alerts.py feat(alerts): add email labels, bulk actions and threshold editing (#52139) 2026-11-16 15:32:19 -08:00
test_chunked_in_lists.py ci: fail on new unbounded SQL IN lists and add a Prisma chunking helper (#42629) 2026-09-26 13:40:44 -07:00
test_cleanup_transactions.py feat(proxy): run spend log cleanup from a DB-backed scheduled job table (#50131) 2026-11-11 18:22:02 -08:00
test_control_plane_runtime_config.py feat(control_plane): fleet-wide team budgets via desired state and reconciliation (#54056) 2026-11-24 10:15:44 -08:00
test_global_spend_refresh_writer.py fix(spend): run the MonthlyGlobalSpend refresh on the writer when a read replica is configured (#45699) 2026-10-10 00:49:13 -07:00
test_harness_lifecycle.py ci: remove CircleCI (#50950) 2026-11-11 15:38:27 -08:00
test_managed_file_flat_ids_index.py test(integration): point database tests at the moved litellm/proxy-extras package (#51453) 2026-11-12 20:27:00 +00:00
test_mcp_server_events_column.py feat(mcp): persist per-server event settings (#53602) 2026-11-24 06:31:10 +00:00
test_migration_entrypoint.py fix(mcp): seed the catalog revision (#53989) 2026-11-23 22:01:53 -08:00
test_partition_transactions.py fix(proxy): avoid blocking writes when attaching spend log partitions (#53858) 2026-11-23 11:19:33 -08:00
test_performance_alerts.py test: update stale integration and e2e expectations for intended changes (#53940) 2026-11-23 14:27:20 -08:00
test_prisma_engine_port.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_prisma_engine_real_io.py fix(proxy): start and serve the proxy with a database on Python 3.10 and prisma 0.13+ (#54416) 2026-11-26 00:09:17 +00:00
test_prisma_migration_lock.py test(integration): fix four flaky integration tests (#49554) 2026-11-02 09:23:17 -08:00
test_proxy_boot_without_general_settings.py fix(proxy-extras): keep the host query param in the v2 migration lock URL (#52797) 2026-11-19 09:37:00 -08:00
test_proxy_database_lifespan.py fix(gateway): honor the configured Postgres connection cap (#52729) 2026-11-19 04:10:10 +00:00
test_reader_writer_regeneration.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00
test_request_log_indexes_at_boot.py fix(proxy): create current and upcoming spend log partitions in the partitioning runbook (#53894) 2026-11-23 20:01:44 +00:00
test_roi_observed.py feat(roi): measure shipping velocity, quality, and recorded spend (#44426) 2026-10-03 23:07:34 +00:00
test_roi_sync_store.py feat(proxy): add native ROI calculator for gateway spend vs merged PRs (#43669) 2026-09-30 14:16:41 -07:00
test_scheduled_job_runs.py test(integration): point database tests at the moved litellm/proxy-extras package (#51453) 2026-11-12 20:27:00 +00:00
test_skill_publication.py feat(skills)!: version published Skills Hub updates (#50152) 2026-11-05 00:19:38 -08:00
test_skill_submissions.py feat(skills): let authors edit and withdraw pending submissions (#51312) 2026-11-12 08:30:10 -08:00
test_spend_lock_order.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_spendlogs_delivery.py test(spend-logs): compare a failed batch's retry time with the clock read before the failure (#54474) 2026-11-25 18:11:37 +00:00
test_spendlogs_ledger_parity.py fix(auth): report unreadable team rows as 503 and open the rust db in the spend logs parity test (#52923) 2026-11-24 19:34:37 +00:00
test_transaction_atomicity.py
test_v1_migration_error_logging.py test(integration): point database tests at the moved litellm/proxy-extras package (#51453) 2026-11-12 20:27:00 +00:00