Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unary gRPC interceptor adding event for nil message on error #697

Closed
wants to merge 1 commit into from
Closed

Fix unary gRPC interceptor adding event for nil message on error #697

wants to merge 1 commit into from

Conversation

htdvisser
Copy link

This pull request adds the patch I suggested in #691 to fix the gRPC interceptor panicking when a handler returns nil, someErr.

Copy link
Member

@Aneurysm9 Aneurysm9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I would like to see a test case added. #695 will hopefully be merged soon, which should provide a place to add the test.

@MrAlias
Copy link
Contributor

MrAlias commented May 15, 2020

#695 was just merged. It should be clear to add tests covering this without any conflict.

@htdvisser
Copy link
Author

Hi @MrAlias and @Aneurysm9,

#695 only added tests for the client interceptors, and not for the server interceptors. I think it would take quite a bit of time for me to add such tests, and I don't have that time right now. I'll close this pull request for now. When I have time in the future, I'll try to implement server interceptor tests and re-submit the fix for the panic.

@htdvisser htdvisser closed this May 18, 2020
MrAlias referenced this pull request in MrAlias/opentelemetry-go May 18, 2020
Fixes unresolved issue identified in #691 and attempted in #697.

Adds unit test to ensure the UnaryServerInfo function does not panic
during an error returned from the handler and appropriately annotates
the span with the correct event.

Restructures the interceptor to remove this class of errors.
jmacd added a commit that referenced this pull request May 19, 2020
Fixes unresolved issue identified in #691 and attempted in #697.

Adds unit test to ensure the UnaryServerInfo function does not panic
during an error returned from the handler and appropriately annotates
the span with the correct event.

Restructures the interceptor to remove this class of errors.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants