Repository navigation
test: repair two CI tests broken by intentional changes - #39932
Merged
yuneng-berri merged 1 commit intoSep 5, 2026
Merged
yuneng-berri merged 1 commit into
yuneng-berri merged 1 commit into
Conversation
test_no_linear_scans_in_router: #39674 renamed heuristic_v2_router_limit_violation to auto_router_capability_violation, so the allowlist entry stopped matching and the same admin-only scan tripped the static check. Rename the entry to follow it. tableScrolling.spec.ts: 9ba6cab (LIT-4738) gave the Tags and Model Hub tables client-side pagination at 25 rows, so the 40 seeded rows no longer render on one page. Select 50 rows per page before counting, as the Logs case already does.
yucheng-berri
approved these changes
Sep 5, 2026
Contributor
Greptile SummaryThis PR repairs two test suites after intentional production changes
Confidence Score: 5/5The PR appears safe to merge because both changes preserve the tests' intended coverage after the underlying behavior changed The pagination helper targets controls shared by both affected tables, and the router allowlist now matches the renamed method while preserving the previous exception
|
| Filename | Overview |
|---|---|
| tests/e2e/ui/tests/tables/tableScrolling.spec.ts | Selects a supported 50-row page so both scrolling tests render and inspect all 40 seeded records |
| tests/router_unit_tests/test_router_index_management.py | Updates the existing linear-scan exception to match the renamed router method without broadening the allowlist |
Reviews (1): Last reviewed commit: "test: repair two CI tests broken by inte..." | Re-trigger Greptile
yuneng-berri
enabled auto-merge
September 5, 2026 19:06
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
yuneng-berri
merged commit Sep 5, 2026
730d789
into
litellm_internal_staging
218 of 222 checks passed
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:
litellm_router_unit_testingande2e_ui_testingare red on staging since this afternoonHow it solves it:
auto_router_capability_violationUser Flow
No user-facing change. Both edits are to tests only
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Before (9878436)
test_no_linear_scans_in_router
litellm_router_unit_testingon the last staging-bound run: https://app.circleci.com/pipelines/gh/BerriAI/litellm/89202/workflows/2e9c2960-9fd4-4cba-bf73-5acb3101ca4fFound O(n) linear scan pattern in router.py: auto_router_capability_violation() at line 8815. The allowlist still names the pre-renameheuristic_v2_router_limit_violationTags and Model Hub scrolling specs
e2e_ui_testingon the same workflowTags: no row paints past the box it lives inandModel Hub: no row paints past the box it lives infail withExpected: >= 40, Received: 25after three attempts. The tables now page at 25After (da5af0c)
test_no_linear_scans_in_router
python -m pytest tests/router_unit_tests/test_router_index_management.py -k test_no_linear_scans_in_router -q1 passed, 8 deselected in 1.03slitellm_router_unit_testingon this PR reports the same test assuccess(5.98s)Tags and Model Hub scrolling specs
E2E_KEEP_ALIVE=1 ./run_e2e.shfromtests/e2e/ui(seeded postgres, mock LLM on 8090, proxy on 4000 serving the UI built from this branch)E2E_UI_BASE_URL=http://localhost:4000 LITELLM_MASTER_KEY=sk-1234 PROXY_LOGOUT_URL=https://www.example.com MOCK_LLM_PORT=8090 npx playwright test --config playwright.config.ts tests/tables/tableScrolling.spec.ts -g "Tags|Model Hub"2 passed (28.2s)e2e_ui_testingon this PR:139 passed (9.6m), and the wholebuild_and_testworkflow succeeded: https://app.circleci.com/pipelines/github/BerriAI/litellm?branch=litellm_%2Fcircleci-pipeline-failure-afe848Type
✅ Test
Caveats (if any)
QA runbook
tests/e2e/ui/tests/tables/tableScrolling.spec.ts › Tags: no row paints past the box it lives in - with 40 tags and the page size raised to 50, every row stays inside the table's own scroll box
for i in $(seq 1 40); do curl -s -X POST http://localhost:4000/tag/new -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d "{\"name\": \"scroll-tag-$i\"}"; donetests/e2e/ui/tests/tables/tableScrolling.spec.ts › Model Hub: no row paints past the box it lives in - same check on the Model Hub table with 40 models
for i in $(seq 1 40); do curl -s -X POST http://localhost:4000/model/new -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d "{\"model_name\": \"scroll-model-$i\", \"litellm_params\": {\"model\": \"openai/fake-gpt-4\", \"api_base\": \"http://127.0.0.1:8090/v1\", \"api_key\": \"fake-key\"}}"; doneFinal Attestation