-
Notifications
You must be signed in to change notification settings - Fork 454
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
Apply master (v1) latest version to v2 #157
Conversation
Improve metrics documentation
When agent write goroutine closed the channel heartbeat and send functions could still write to the channel causing a panic. send already had a recover for this but heartbeat didn't have. This commit does not close the channel anymore and to make so the writers don't block sending when an agent is closed a select is used reading from die channel that signals that a agent is closed. The write channel is never closed but it's ok as when a Agent is not used anymore it will be garbage collected as the agent is the only reference to it.
Fix agent race condition
…lose-logs Reduce connection close error logs
* Add more information to nats timeout error logs
processRemote function is always called with a nil server and because of this pitaya was crashing in production. This commit moves the log from this process to rpc call function that has the target information and returns this info wrapping the error returned.
@@ -68,6 +69,12 @@ func (m *MyComp) RemoteErr(ctx context.Context) (*test.SomeStruct, error) { | |||
|
|||
type unregisteredStruct struct{} | |||
|
|||
func errorIs(t *testing.T, err1 error, err2 error) { | |||
if !assert.ObjectsAreEqual(err1, err2) && !errors.Is(err1, err2) { |
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.
Shouldn't it be !assert.ObjectsAreEqual(err1, err2) || !errors.Is(err1, err2)
?
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.
I think we assume that the struct being equal is not enough to consider it as the same (same for the opposite). But @victor-carvalho has more context on it.
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.
Gotcha. Just double checking, anyway 😂
Pull Request Test Coverage Report for Build 1092
💛 - Coveralls |
LGTM |
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
The following is being ported: #139, #143, #148, #151, #150 and #154.
The latest addition to master (#153) is not being ported in this PR. It will require some changes and will be done in a separate PR.