Repository navigation
test(proxy): delete the legacy proxy test tree and shard tests/unit/proxy by glob - #44018
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
|
Contributor
Author
|
@greptileai review |
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 14:13
e79897b to
a620b30
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 14:13
8864d36 to
c829e8b
Compare
Contributor
Author
|
@greptileai review (rebased onto the updated PR 6) |
Contributor
Author
|
@greptileai review |
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 16:35
a620b30 to
8c84336
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 16:40
dab7efa to
633713c
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 17:53
8c84336 to
c7bbab0
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 17:53
633713c to
25ef8d3
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 18:07
c7bbab0 to
a03f35e
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 18:07
25ef8d3 to
8d04963
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 18:14
a03f35e to
928c73a
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 18:15
8d04963 to
7ac7dab
Compare
… test from loopback Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ed children Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ing-v2 RPM tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p7
branch
from
October 1, 2026 18:24
7ac7dab to
c4867bc
Compare
yuneng-berri
approved these changes
Oct 1, 2026
1 of 6 tasks
yuneng-berri
added a commit
that referenced
this pull request
Oct 1, 2026
…4055) * docs(proxy): point mcp_server test references at tests/unit/proxy The legacy tests/test_litellm/proxy tree was removed in #44018. Repoint the mcp_server AGENTS.md mirror path, swap its auth example for a module that still exists, and drop the utils.py comment block that named the old test path * docs(proxy): fix remaining mcp_server legacy test path and note import-time env reads Repoint the second tests/test_litellm reference in the mcp_server AGENTS.md Tests section and move the import-time env guidance there from the removed utils.py comment
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:
tests/test_litellm/proxystill held one pass-through file, its conftest and package markerstests/unit/proxywould land in no GHA shard, with nothing flagging itHow it solves it:
git mvof the last file, then the legacy conftest and__init__.pyfiles are deletedSHARDED_ROOTSnamestests/unit/proxy, and the root files are atests/unit/proxy/test_*.pyglob in a newproxy-infra-rootshard--shardsalso counts pathsunit_selection.shadds for a flag, but only when some GHAunit-flag:wires that flagPR 7 of 7, stacked on #44015. After it,
tests/test_litellm/proxyno longer existsScreenshots / Proof of Fix
Coverage ledger
Same
ledger.pyas the rest of the stack, baseorigin/litellm_migrate_proxy_tests_p6The single pair is the redirect test rename, so every id is accounted for. The two deleted legacy files are
conftest.pyand__init__.py, andtest ! -e tests/test_litellm/proxyholdsCoverage guard catches a new directory
A throwaway
tests/unit/proxy/zz_new_dir/{__init__,test_x}.pyadded locally at the head, then removed (never committed)With the throwaway removed, it prints
OK: all 161 test children across 2 sharded trees are assigned to a shard.and exits 0. A throwaway root filetests/unit/proxy/test_zz_new_root.pyis picked up by the proxy-infra-root glob without any editunit_selection.shis now parsed percasearm._shard_tokenscredits an arm's paths only when its label is the value of someunit-flag:in a workflow, so a path claimed only by an unwired flag is reported as unassigned.test_shard_tokens_credits_only_wired_unit_flagsbuilds a tree where one arm is wired and one isn't, and asserts the unwired child is flagged. Crediting every arm turns it red:The union of all arms that the default census uses is the same token set as before
Pointing
SHARDED_ROOTSattests/unit/proxysurfaced two directories that only the CircleCIunitcatch-all ran.tests/unit/proxy/management(from #43364, before this stack) now joinsproxy-infrathroughunit_selection.shand runs 36 passed with sockets blocked and zero egress. No other flag or workflow selects it.tests/unit/proxy/response_pollingwas named only file by file in its proxy-db group, so that entry now names the directory (same group, same selection)Root-file glob and the proxy-infra split
The 81 root files moved from
proxy-infrainto a newproxy-infra-rootshard (same workers, reruns and timeouts, nounit-flag), andmake test-unit-proxy-rootmirrors it.test_streaming_handler.py's event-loop-lag asserts failed twice in proxy-infra on 820e63c. On that worker they shared time with heavy synchronous root files such astest_health_check_max_tokens.py. Splitting fixes that without touching the assert. Collect-only: proxy-infra 5027 ids plus proxy-infra-root 3218 ids gives 8245, identical to the pre-split proxy-infra selection with 0 overlap. The root glob plus 25--ignore=selects the same 81 files as PR 6's explicit listRedirect test
respx serves two routes.
https://upstream.test/redirect/1returns 302 withLocation: /get, and/getreturns 200 JSON.httpx_transportkeeps the call on httpx. The test asserts a 200, the/getbody and the recorded call URLs in order. It passes 20 of 20 in a row. Flipping thefollow_redirectsdefault toFalseinlitellm/llms/custom_httpx/http_handler.pyturns it red, reverted afterwardstest_check_shards_passes_on_the_repo_as_it_standscalls_check_shards()directly and goes red when| _unit_selection_tokens()is dropped from itRuns
tests/unit/proxy/pass_through_endpointswithenv -i, outbound sockets blocked and the egress recorder,-n 4 --timeout=120: 1579 passed.tests/unit/proxy/managementunder the same settings: 36 passed, no egress.tests/unit/test_package_layout.pyandtests/unit/test_assert_ci_coverage.pypass, andassert_ci_coverage.pyprints OK in default,--shardsand--slicesmodes. Ruff is clean on the edited files.git grep "test_litellm/proxy\|test_litellm\.proxy"returns only the two lines inlitellm/proxy/_experimental/mcp_server/that this stack does not touchNon-rename edits
pass_through_endpoints/test_pass_through_endpoints.py.github/workflows/test-unit.ymlproxy-infra-rootshardMakefiletest-unit-proxy-roottarget,PROXY_INFRA_ROOT_TESTSremoved.github/scripts/assert_ci_coverage.pySHARDED_ROOTSentry, and--shardscreditsunit_selection.sharms only for GHA-wired flags.circleci/scripts/unit_selection.shtests/unit/proxy/managementunder proxy-infra,response_pollingnamed as a directorytests/unit/test_assert_ci_coverage.py_shard_tokens, new_check_shardsand unwired-flag teststests/test_ratelimit.pytests/unit/proxy/hooks/test_parallel_request_limiter.py, sincetest_router_rate_limit.pyno longer existstests/e2e/batches/COVERAGE.md,utils/prisma_and_spend/conftest.py,utils/proxy_logging/conftest.pytests/test_litellm/proxy/conftest.py,__init__.pytests/unit/proxy/conftest.pyearlier in the stack, and no file imports itType
✅ Test
Caveats (if any)
Low
test_pass_throughs_stay_open_while_a_db_sync_reads_the_databasetrieslangfuse.example.test:443test_passthrough_keeps_each_registered_litellm_owned_name_out_of_the_forwarded_body[no-log], a pure function test, so it looks like a leaked background send.testname, blocked in unit CI, and both tests pass either wayFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/d9bda95617da464e88d3619765819d0e
Open in Devin Desktop: https://app.devin.ai/desktop/session/d9bda95617da464e88d3619765819d0e?variant=devin