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

Notification support #18

Merged
merged 32 commits into from
Feb 6, 2019

Conversation

irgendwr
Copy link
Contributor

This pull-request adds support for notifications (fixes #17).

notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
helpers_test.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
@irgendwr
Copy link
Contributor Author

Thanks for the feedback! I've addressed every issue/suggestion that you mentioned, let me know if I missed something.

@irgendwr
Copy link
Contributor Author

go test sometimes fails due to a data race on TestClientDisconnect but I have no idea how this could be fixed/improved.
I would be grateful if anybody has a suggestion on how to solve this.

@stevenh
Copy link
Contributor

stevenh commented Aug 14, 2018

To you have the race details @irgendwr ?

client.go Outdated Show resolved Hide resolved
@stevenh
Copy link
Contributor

stevenh commented Aug 14, 2018

Ok I found the race in the logs, your concurrently accessing connected in multiple goroutines which is why you have the race.

client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
@irgendwr
Copy link
Contributor Author

irgendwr commented Oct 4, 2018

The data race should be fixed for real now \o/
Looking forward to another response or code review! 😄

client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
@irgendwr
Copy link
Contributor Author

irgendwr commented Oct 5, 2018

This PR will probably be ready in 2020 😄

@stevenh I should have resolved everything except for this, which needs clarification or an example (I've also mentioned a better alternative here), and this which needs a sugesstion/solution.

client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Show resolved Hide resolved
@irgendwr
Copy link
Contributor Author

irgendwr commented Oct 8, 2018

@stevenh Any feedback on the changes?

client.go Outdated Show resolved Hide resolved
} else {
c.res = append(c.res, line)
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about time errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean. Timeout errors? Any errors are returned with c.err <- err

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, but as you're always reading, in order to facilitate notifications, and every read should have a timeout (not just the ones triggered by writes) then you need to deal with the expected timeouts otherwise the client would get a constant stream of errors even when they didn't send any commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But why should the read in the message handler have a timeout? This would just lead to constant timeout errors and serve no purpose imho.
Otherwise I could set a deadline and and just ignore all of the errors caused by timeouts.

helpers.go Outdated Show resolved Hide resolved
notification.go Outdated Show resolved Hide resolved
@irgendwr
Copy link
Contributor Author

@stevenh Can you respond to my comment above? I don't see a benefit to constant read timeouts, only downsides.

@irgendwr
Copy link
Contributor Author

irgendwr commented Jan 3, 2019

Happy new year to pull request #18 🎉
(and also congratulations on turning 6 moths old ^^)

@Blendman974
Copy link

So can someone merge this ?

@irgendwr
Copy link
Contributor Author

irgendwr commented Feb 6, 2019

Yeah, I would also like to see this getting merged.
I opened it 7 Months ago! and responded to every comment and fixed everything that @stevenh told me to.

It honestly really sucks that after putting in a fair amount of effort into this he doesn't even respond anymore.

I might just continue developing this in my own fork and give up on submitting any pull-requests here. I'm definitely not as skilled/experienced as @stevenh in go but otherwise it's impossible to get stuff implemented.

@stevenh
Copy link
Contributor

stevenh commented Feb 6, 2019

Many apologies for dropping the ball on this one, I think I've been missing notifications from github. Had the issue before and had to have them flush their mail servers to fix it.

Most the of issues are sorted so going to just merge and we can iterate if needed.

@stevenh stevenh merged commit 78271a6 into Unity-Technologies:master Feb 6, 2019
@irgendwr irgendwr deleted the notification-support branch February 8, 2019 17:07
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.

Notification Support
3 participants