Repository navigation
ci(circleci): test Redis behavior against local Redis and print short tracebacks - #44062
Merged
Merged
Conversation
… tracebacks The redis_caching_unit_tests job ran three legacy files against the shared remote Redis. The DualCache and batch-read logic that never needed a server now lives in tests/unit/caching/test_dual_cache.py with a mocked RedisCache, and the behavior that does need one (the increment-with-floor Lua script, read-through, deletes, batch reads) moved to tests/integration, which starts a local Redis. test_returned_settings only read REDIS_PORT and is replaced by a unit test of Router.get_settings CircleCI pytest runs now use --tb=short so failure output stays readable in the test results tab
Contributor
|
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
yuneng-berri
enabled auto-merge (squash)
October 1, 2026 19:59
yucheng-berri
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
tests/integration, which starts a local Redisredis_caching_unit_testsjob removed; its coverage now comes from the unit and integration jobs--tb=shortPre-Submission checklist
uv run pytest tests/unit/<your_test_file>.py -vScreenshots / Proof of Fix
This PR only changes tests and CI config, so there is no proxy behavior to curl. The proof is that each new test fails when the code it covers is broken. All runs below are at the PR tip, with no secrets in the environment and a local
redis-serverfor the integration filesBefore (bba85f0)
tests/local_testing/test_dual_cache.py,test_redis_batch_optimizations.pyandtest_redis_increment_with_floor.pyneededREDIS_HOST,REDIS_PORTandREDIS_PASSWORDpointing at the shared Redis, so they only ran in theredis_caching_unit_testsjobtest_returned_settingsintests/local_testing/test_router_utils.pyreadREDIS_PORTbut never touched RedisAfter (61cc20f)
tests/unit/caching/test_dual_cache.pyandtests/unit/test_router_get_settings.py: all pass with no Redis and no networktests/integration/routing/test_redis_increment_with_floor.pyandtests/integration/sdk/test_dual_cache_redis.py: 9 passed against a local Redislitellm/caching/dual_cache.pyandlitellm/caching/redis_cache.py, each run and reverted, all turned at least one new test red:local_onlysaddskips memorycircleci config validate .circleci/config.ymlreports the config as valid, and every pytest call in it passes--tb=shortType
🚄 Infrastructure
✅ Test
Caveats (if any)
Low
test_basic_functionality_not_brokendropped, since the existing unit get/set test already covers it