Repository navigation
fix(httptransport): classify remaining client cancellations - #5251
Merged
Merged
Conversation
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (4)
📒 Files selected for processing (24)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
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.
Wrapped gRPC cancellations can still produce HTTP 500 and ERROR diagnostics after the caller cancels its request. Legacy problem responses also override statuses by matching
context canceledin error text. This completes the shared classification introduced in #5236.database/sqlautomatically rolls back beforeCommit, while retainingsql.ErrTxDone.e2e/httperrorscovers the shared contract through real HTTP/1 TCP half-closes, HTTP/2 resets, gRPC calls, and PostgreSQL automatic rollback. Controlled test handlers exercise all changed paths without production fault-injection endpoints. The suite runs under the race detector as part ofmake -C e2e test-base;make -C e2e test-http-errorsruns it independently.Validation:
The changes since the previous review appear safe to merge.
Summary
The PR extends cancellation classification across HTTP transport, legacy problems, and v3 errors, and adds connection-level and transaction tests. Since the previous review, it also adds an e2e error-handling suite and distinguishes server write timeouts from canceled response writes.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Request or response failure] --> B{Request context canceled?} B -- No --> E[Preserve error status and diagnostics] B -- Yes --> C{Typed cancellation cause?} C -- Yes --> D[Record empty 499] C -- No --> F{Response write failed?} F -- No --> E F -- Yes --> G{Network timeout?} G -- Yes --> E G -- No --> H[Preserve committed status; warn]Reviews (2) · Last reviewed commit: "test(httptransport): cover cancellation ..."