Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Prevent send on stream if closed #18

Closed
fparga opened this issue Jun 12, 2023 · 3 comments · Fixed by #19
Closed

Prevent send on stream if closed #18

fparga opened this issue Jun 12, 2023 · 3 comments · Fixed by #19
Assignees
Labels
bug Something isn't working

Comments

@fparga
Copy link

fparga commented Jun 12, 2023

I've been trying this new extension quite extensively for a few days now, mainly to test a GRPC streaming API, and everything has been quite smooth, thanks for the great work!

I've been struggling a bit on an issue that I'm not sure what's the proper way to address.
When doing bidirectional streaming RPC, where the client starts streaming requests to the server, and the server streams replies.

Is there any way to prevent such errors when the server send a final reply and close the stream before the client has send all its data (because processing is done and the additional data the client might send is irrelevant):

ERRO[0105] failed to send data to the stream error=EOF
INFO[0105] Stream Error: {"code":2,"details":[],"message":"EOF"} source=console

Is there a way to prevent a send if the stream is closed? Or to properly handle that error?

@olegbespalov
Copy link
Collaborator

Hey @fparga ! Thanks for the feedback ☺️

It seems like a pretty straightforward fix. Let me have a look into it.

@olegbespalov olegbespalov self-assigned this Jun 14, 2023
@olegbespalov olegbespalov added the bug Something isn't working label Jun 14, 2023
@olegbespalov
Copy link
Collaborator

Hey @fparga . Here is a tiny update on that issue. As you can see, an open PR #19 tries to address the issue. However, during the review, we found some concerns about handling EOF in the case you mentioned. We want to double-check and ensure that any actual error can't cause such EOF.

Also, since k6/experimental/grpc has landed in with the k6 v45.0, maybe we could collect more input on the topic.

So I'll keep this updated

@fparga
Copy link
Author

fparga commented Jun 20, 2023

Thanks for the update @olegbespalov, sounds good to me. Let me know if I can help in any way!

🎉 Congrats for the v45.0 launch, can't wait to try it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants