[Fix] Router code coverage CI failure for health check filter tests - #24812
Conversation
The router_code_coverage.py script only scans test files with "router" in the filename. test_health_check_routing.py was invisible to this check, causing _async_filter_health_check_unhealthy_deployments and _filter_health_check_unhealthy_deployments to appear untested. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR fixes a false-positive CI failure in the router code-coverage check by renaming
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/test_litellm/router_utils/test_router_health_check_routing.py | Renamed from test_health_check_routing.py; file content is 100% identical — adds "router" to filename so the coverage scanner (which filters on "router" in file.lower()) picks it up correctly. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["router_code_coverage.py\nscans test directories"] --> B{"'router' in\nfilename?"}
B -- "No ❌\ntest_health_check_routing.py\n(before rename)" --> C["Skipped\n→ functions appear untested\n→ CI fails"]
B -- "Yes ✅\ntest_router_health_check_routing.py\n(after rename)" --> D["File processed\n→ functions marked tested\n→ CI passes"]
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
[Fix] Router code coverage CI failure for health check filter tests
Relevant issues
Router code coverage CI check failing with:
Summary
Failure Path (Before Fix)
router_code_coverage.pyonly scans test files with"router"in the filename. The test filetest_health_check_routing.pydidn't match this filter, so the two functions appeared untested despite having full test coverage.Fix
Renamed
test_health_check_routing.py→test_router_health_check_routing.pyso the coverage scanner picks it up.Testing
python3 ./tests/code_coverage_tests/router_code_coverage.pynow reportsuntested_perc: 0.0Type
🐛 Bug Fix
✅ Test