litellm/tests/e2e/migrations
Yuneng Jiang dc85812971
test(migrations): close the gaps the upgrade assertions left open
Three holes in the new suite, all of which let a test pass without proving
what its name claims:

- A migration recorded twice, once per replica, each with
  applied_steps_count = 1, slipped past both the step-count check and
  migration_names(), which collapses the history into a set. Reject
  duplicate migration_name rows outright.
- auth_traffic only asserted the failures it had seen by the time
  keep_serving hit its target. A request failing after that, or on the
  other replica while the test waited on one stream, was recorded and
  never read. Assert the recorded failures once the thread has joined.
- The rolling test warmed the baseline replica's virtual-key cache before
  the upgrade, and that cache holds for 60 seconds by default
  (UserAPIKeyCacheTTLEnum.in_memory_cache_ttl). The candidate migrates
  well inside that window, so the post-upgrade requests could be served
  from cache without ever repeating the whole-row token lookup that the
  stale prepared statement breaks. Drive the baseline replica with a key
  minted after the schema moved, which it has never seen and must resolve
  from the database.

Re-ran against v1.101.0 -> v1.102.0: 6 passed.
2026-09-21 13:15:46 -07:00
..
__init__.py fix(proxy): coordinate v2 migration startup and add container regression CI 2026-09-12 18:24:59 -07:00
checks.py test: isolate migration CI selection and exercise resolver boundaries 2026-09-12 18:49:58 -07:00
conftest.py test(migrations): cover the release-to-release upgrade path 2026-09-21 12:50:58 -07:00
containers.py test(migrations): cover the release-to-release upgrade path 2026-09-21 12:50:58 -07:00
database.py fix(proxy): coordinate v2 migration startup and add container regression CI 2026-09-12 18:24:59 -07:00
startup_models.py fix(proxy): coordinate v2 migration startup and add container regression CI 2026-09-12 18:24:59 -07:00
test_legacy.py test: isolate migration CI selection and exercise resolver boundaries 2026-09-12 18:49:58 -07:00
test_pooling.py test: isolate migration CI selection and exercise resolver boundaries 2026-09-12 18:49:58 -07:00
test_recovery.py test: isolate migration CI selection and exercise resolver boundaries 2026-09-12 18:49:58 -07:00
test_rolling_upgrade.py test(migrations): close the gaps the upgrade assertions left open 2026-09-21 13:15:46 -07:00
test_shaped_database.py test(migrations): cover the release-to-release upgrade path 2026-09-21 12:50:58 -07:00
test_startup.py test: isolate migration CI selection and exercise resolver boundaries 2026-09-12 18:49:58 -07:00
test_upgrade.py test(migrations): cover the release-to-release upgrade path 2026-09-21 12:50:58 -07:00
upgrade.py test(migrations): close the gaps the upgrade assertions left open 2026-09-21 13:15:46 -07:00