Repository navigation
test(integration): partition wedged burst publishes by burst-only evidence and kill a real uvicorn worker - #46029
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…dence and kill a real uvicorn worker
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
|
#47108 is merged and changes this same wedged Redis test, so this PR now conflicts with main and needs main merged in before review |
Contributor
Author
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
This branch has not been deployed
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:
How it solves it:
Started server process [pid]child, asserted gone after SIGKILLRelevant issues
CircleCI job 2258028 (integration-management-replica, SHA 102619d) failed with "wedged publishes unexpectedly landed after recovery: ['..._u20']". In that run's proxy log u20 failed during the bulk phase but not during the burst, so its burst publish was parked behind the 16-slot semaphore and correctly delivered after SIGCONT
Pre-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 more@greptileaito re-request a review after pushing changes)Delays 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
This PR only changes an integration test, so the proof is the test itself run against a real proxy (2 workers), real Postgres and a real owned Redis, plus two product mutations that must turn it red. Every run used the local copy of
.circleci/scripts/run_integration.shwith the group's egress guard stripped and Redis 7.2.16 first on PATHPATH="/home/ubuntu/scratch/redis7:$PATH" bash /home/ubuntu/scratch/run_integration_local.sh management replicaBefore (102619d)
1 passed in 140.75s), and its proxy log showed both workers fromStarted server process [5622]and[5623]still alive at the final SIGTERM with noChild process [...] diedline, so the old_worker_pidkilled something other than a workerAfter (c3add1f)
Five runs in a row
burst_partitionandtransport_error_countproperties from each run's junit1 passed in 135.57s (0:02:15)1 passed in 129.96s (0:02:09)1 passed in 129.11s (0:02:09)1 passed in 139.84s (0:02:19)1 passed in 131.01s (0:02:11)In every run the proxy log shows
Child process [<victim>] diedfollowed by a newStarted server process, and the burst still returned 200s within the unchanged timing budgetsMutation A, re-publish a timed-out publish after recovery
litellm/proxy/common_utils/auth_cache_invalidation_pubsub.py, reverted before pushingexcept Exception as e: # noqa: BLE001 # best-effort publish; mutations must never fail on redis errors verbose_proxy_logger.warning("auth cache invalidation publish for %s failed: %s", cache_key, e) + while True: + try: + await pubsub_capable_client(redis_cache).publish(auth_cache_invalidation_channel(redis_cache), message) + return + except Exception: + await asyncio.sleep(0.5)test_user_updates_wedged_coordination_redis.py:350Mutation B, drop parked publishes instead of delivering them
test_user_updates_wedged_coordination_redis.py:321, the poll that waits for every wedged burst key to either time out after the burst offset or land after recoveryType
✅ Test
Caveats (if any)
Medium
<= 3transport-error boundtimed_outempty in two of three runsLow
scripts/test_quality_gate.pycould not fetch its default base locally, so it ran with--base origin/main(passed)