Repository navigation
fix(rust): clear the two rust-test failures on main - #53776
Closed
yujonglee-berri wants to merge 1 commit into
Closed
yujonglee-berri wants to merge 1 commit into
yujonglee-berri wants to merge 1 commit into
Conversation
The budgets charge test expected a step whose customer counter cannot be seeded to leave the reservation unstamped. The step stamps it and then reports the failure, as the Python step it ports does, so the test has failed since it landed. The bridge's boundary scan rejects serde_json::from_str outside litellm-host-python, and the user repository parsed its JSON arguments with it. It now goes through a json_from_str helper in that crate
Contributor
PR overviewNo security issues were found in this pull request. Reviews
|
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Nov 23, 2026
Contributor
Author
|
Closing as superseded by #53922, which landed the same four fixes plus the stub update on main. |
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.
Handwritten 1-3 sentence description
[insert handwritten description here]
Details
TLDR
Problem this solves:
rust-testjob fails on main and stops at the first failurerust-testslabel, so neither was caughtHow it solves it:
litellm-host-pythonlitellm-host-pythongets ajson_from_strhelper next tojson_dumpsThe budgets test,
a_customer_counter_that_cannot_be_seeded_fails_the_step_with_the_rest, came in with #52166 and fails at that commit too. It expected the reservation to stay unstamped. The step stamps it and then reports the seeding failure, which is what the Python step it ports does:increment_spend_counters_batchedcallsstamp_budget_reservation_actual_costbefore it raises the first scope error. The other three assertions in the test already heldThe second test,
marshal_boundary::serialization_uses_the_interop_boundary, scans the bridge's sources forserde_json::from_str. #52756 added one indb_repository/user.rsUser Flow
Before: a maintainer who labels a Rust PR
rust-testsseesrust-testfail on tests their PR never touchedrust-testslabel to their pull requestrust-teststartscargo nextest run --workspace --lockedAfter: the run gets past both tests
rust-testslabel to their pull requestrust-teststartscargo nextest run --workspace --lockedPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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 moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
E2E exception at 3669599. One change is a test expectation. The other moves a
serde_json::from_strcall behind a helper that makes the same call, so the error text and the parsed value are unchanged and no request can behave differently. The two tests that fail in CI are the proof. Run fromlitellm/rust, with Docker running for the Redis container the budgets test startsMain (6a6c90a)
This PR (3669599)
The first failure is the one in main's scheduled run https://github.com/BerriAI/litellm/actions/runs/44984312162
To find what the first failure was hiding, I ran the whole workspace on main plus the budgets fix with
cargo nextest run --workspace --locked --no-fail-faston a Mac: 13,746 run, 13,734 passed, 12 failed. One is the boundary scan fixed here. The other 11 are local to my machine: 7 compare a Linux errno (111, mine is 61) and 4 Bedrock region tests pick up the default region in my~/.aws/configcargo fmt --all --checkandcargo clippy -p litellm-host-python -p litellm-python-bridge -p litellm-callbacks-budgets --all-targets --locked -- -D warningsare cleanType
🐛 Bug Fix
Caveats (if any)
Medium
rust-testslabel, so its ownrust-testrun is the Linux answerLow
rust-wheelin the same workflow fails for a different reason, fixed in fix(rust_bridge): bring the native stub back in line with the compiled module #53772Final Attestation