Repository navigation
fix: preserve edge streaming responses on upstream failure - #7
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # README.md
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.
Summary
An upstream read failure after TF sends HTTP headers currently appends a second HTTP response into the stream. The handler also retains the entire response with inspection disabled, and its 60-second timeout can expire before Olla's generated 120-second backend allowance.
Keep the existing handler and HTTPX client. Preserve the selected endpoint in failure accounting and clear active-request tracking in
finally. Client output is never truncated by the inspector limit. No routing, retry or scheduler changes. Independent of #5 and the memory-guard PR.Evidence
HTTP/1.0status lines after read failures, and 1,310,880 captured bytes with inspection disabled or enabled.After: one HTTP response, incomplete streams close without a second response or fabricated completion, upstream streams close, failures retain endpoint accounting, and captures are absent or bounded to 1 MiB.
make dev-lintandgit diff --checkpass.make dev-check: 351 passed, 1 failed using an ignored copy oftfconfig.example.yaml. The existingtest_cluster_status_reports_inference_healthexpects13G, while the example config supplies11G. The same failure was reproduced from unchangedmainatb458a4e.Merge Danger
Door: two-way
Revert to restore the former timeout and diagnostic-capture behavior.
Blast Radius: edge
The 180-second HTTPX timeout also applies to buffered inference requests and can hold stalled requests longer; it is an I/O timeout, not a total generation deadline. Streaming inspector entries may contain only a prefix and mark it with
body_truncated: true. A stream already started can retain HTTP 200 on the wire while access accounting records the upstream failure as 502. No live gateway deployment or inference load test was performed.