stream: Fix default data won't be received issue#208
stream: Fix default data won't be received issue#208lifupan merged 2 commits intocontainerd:masterfrom
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #208 +/- ##
==========================================
- Coverage 24.42% 24.35% -0.07%
==========================================
Files 16 16
Lines 2645 2652 +7
==========================================
Hits 646 646
- Misses 1999 2006 +7
☔ View full report in Codecov by Sentry. |
|
would it be worth adding a message to the example that validates this? Sounds like it is pretty easy to replicate by passing 0's here ttrpc-rust/example/async-stream-client.rs Lines 124 to 125 in 555c412 |
And verify containerd#208 Signed-off-by: Tim Zhang <tim@hyper.sh>
|
@jsturtevant Good suggestion, I've just finished it and please help to review it again, thanks |
Protobuf encodes default values, e.g., 0 for number, "" for string, as empty payload and we wouldn't send empty payload to a receiver. This commit change the method of empty message detecting. Fixes containerd#169 Fixes containerd#207 Signed-off-by: Tim Zhang <tim@hyper.sh>
Add test for issues: containerd#169, containerd#207 Signed-off-by: Tim Zhang <tim@hyper.sh>
5884e9a to
2678850
Compare
example/async-stream-client.rs
Outdated
|
|
||
| #[cfg(unix)] | ||
| async fn divide_stream(cli: streaming_ttrpc::StreamingClient) { | ||
| let mut stream = cli |
There was a problem hiding this comment.
nit: Could we create a test case to test the default value specifically instead of messing it into divide_stream?
There was a problem hiding this comment.
A new case was added instead of modifying one of the exists.
Add test for issues: containerd#169, containerd#207. Signed-off-by: Tim Zhang <tim@hyper.sh>
2678850 to
e16aa7b
Compare
Cut the release for containerd#196, containerd#197, containerd#200, containerd#203, containerd#208 Signed-off-by: Tim Zhang <tim@hyper.sh>
Add test for issues: containerd#169, containerd#207. Signed-off-by: Tim Zhang <tim@hyper.sh>
…ult-data stream: Fix default data won't be received issue
Cut the release for containerd#196, containerd#197, containerd#200, containerd#203, containerd#208 Signed-off-by: Tim Zhang <tim@hyper.sh>
Protobuf encodes default values, e.g., 0 for number, "" for string, as empty payload and we wouldn't send empty payload to a receiver.
This commit change the method of empty message detecting.
Fixes #169
Fixes #207