fix: surface data when received non-grpc header, end stream without trailers#9217
Open
chengxilo wants to merge 1 commit into
Open
fix: surface data when received non-grpc header, end stream without trailers#9217chengxilo wants to merge 1 commit into
chengxilo wants to merge 1 commit into
Conversation
If we were collecting non-gRPC response data, finalize the status with whatever body we've buffered so far instead of discarding it. Add tests in both internal/transport_test.go and test/end2end_test.go to test it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9217 +/- ##
==========================================
- Coverage 83.27% 83.22% -0.05%
==========================================
Files 420 420
Lines 34022 34028 +6
==========================================
- Hits 28331 28319 -12
- Misses 4262 4278 +16
- Partials 1429 1431 +2
🚀 New features to boost your workflow:
|
|
I can confirm this works: Thank you for the quick followup! Looking forward to pulling the next release in and enjoying more discoverable error messages. |
Contributor
Author
Great!!! Thank you so much for your quick followup too! ❤️❤️❤️ |
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.
Follow up: #8929
Related to: #7406 (comment) . I don't have the captured packages for reference. But according to the code, I think what I fixed is the only code path that produces codes.Internal / "server closed the stream without sending trailers" when nonGRPCStatus is set.
With this change, if we were collecting non-gRPC response data, and received an end of stream while there is no trailers, finalize the status with whatever body we've buffered so far instead of discarding it. I added tests in both
internal/transport_test.goandtest/end2end_test.goto test it.RELEASE NOTES: