-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-150 Clarify error message when remote goes down #1531
RSDK-150 Clarify error message when remote goes down #1531
Conversation
f0dfeda
to
79a1a5f
Compare
0840f1c
to
81836c6
Compare
81836c6
to
bf58be0
Compare
robot/client/client.go
Outdated
opts ...googlegrpc.CallOption, | ||
) error { | ||
if needsConnectionCheck(method) { | ||
rc.Logger().Debugw("checking remote connection", "method", method) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is gonna spam us a lot; maybe remove after testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed - I am only going to keep the log for when we skip the method call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good, but would echo concerns about spammy logs
list out exempt methods reduce logging use built-in io.ErrClosedPipe error check error string reduce logging comment on interceptor order
also add tests for stream interceptor disconnect
3dcc1cd
to
2bf947e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if err == nil { | ||
return false | ||
} | ||
return strings.Contains(err.Error(), io.ErrClosedPipe.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should be able to do errors.Is
instead of a straight string match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly we need to do the string match since the pipe closed error we receive is constructed from status.Error method, so it's not actually the same error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so sad
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JIRA: https://viam.atlassian.net/browse/RSDK-150
TODO