Repository navigation
fix(ci): register the OSS auth pass-through on a real FastAPI app in its test - #44402
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…its test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
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! |
…egistration test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3be0140. Configure here.
TLDR
Problem this solves:
proxy-infra / Run testsis red on main since 8b1990b (feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers #44236)tests/unit/proxy/pass_through_endpoints/test_passthrough_auth_default.py::test_register_passthrough_with_auth_true_works_for_ossAttributeError: Mock object has no attribute 'state'How it solves it:
app.stateto skip lazy feature routes, on purposeMagicMock(spec=FastAPI), which has nostateattributeFastAPI()app, so it runs the same code production runs/forwarderroute exists once with route-leveluser_api_key_authThe earlier red on b024950 (run 37140923245, prisma span table test) is already fixed on main by #44384
Pre-Submission checklist
uv run pytest tests/unit/<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
Test-only change, so the proof is the previously red
proxy-infra / Run testsjob passing on this PR's tip. Link pending CIType
✅ Test
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/5fc584cba6624610bf8cc2d2abdd7e95
Open in Devin Desktop: https://app.devin.ai/desktop/session/5fc584cba6624610bf8cc2d2abdd7e95?variant=devin
Note
Low Risk
Test-only change with no production code paths modified.
Overview
Fixes a failing OSS pass-through registration test by using a real FastAPI app instead of a
MagicMock, so registration exercises the sameapp.stateaccess that broke CI after #44236.The test now also verifies that
/forwarderis registered once withuser_api_key_authon the route, is listed inLiteLLMRoutes.openai_routes, and is recorded in the pass-through registry withauth=True, with teardown that restores the shared routes list.Reviewed by Cursor Bugbot for commit 3be0140. Bugbot is set up for automated code reviews on this repo. Configure here.