-
Notifications
You must be signed in to change notification settings - Fork 2.8k
server: Configurable websocket keep alive interval #6092
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
server: Configurable websocket keep alive interval #6092
Conversation
|
Beep boop! 🤖 Hey @v0d1ch, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. Stay awesome! 😎 |
4cc43ef to
944693f
Compare
944693f to
ed966c7
Compare
|
@v0d1ch If you intend this PR to be reviewed, then please look at the failing test cases - I believe them to be caused by the new If you're still working on this, you can also keep this PR in a "draft" state for now - click "Convert to draft" under the "Reviewers" column on the right-hand side. |
efbb189 to
a3586dd
Compare
|
Deploy preview for hasura-docs ready! Built with commit a11d929 |
d7336cd to
b21a136
Compare
Accept new server flag --websocket-keepalive to control websockets keep-alive interval
b21a136 to
0000091
Compare
|
paging DR. @abooij ! This thing is ready for review now once you find the time. |
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.
Thanks for this PR, @v0d1ch. It looks like it's in quite a good state. I've added two potential simplifications.
If you want to adjust this PR, please append commits rather than force-pushing, so that I can see what you've changed from one round of reviews to the next. In this project we usually squash merge PRs, so it doesn't matter if the commit history of this PR gets a bit messy.
Are you doing this as part of Hacktoberfest?
I think the argument passing through some of the related functions could use some love but I didn't want to go out of scope of the task. If you want this handled just create the issue and I'd be happy to help out.
Yes, you're absolutely right, also for not going out of scope. I believe some of the WSServerEnv construction/destruction code can be vastly simplified by making better use of RecordWildCards, which is turned on globally. PRs are more than welcome! :-)
|
@tirumaraiselvan Could you please verify that you're happy with the CLI flags and environment variable naming? (And, as is tradition, the changelog.) |
abooij
left a comment
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.
Great, thanks a lot for this, @v0d1ch!
@tirumaraiselvan, could you please check that you are happy with the new flag --websockets-keepalive, and the changelog?
CHANGELOG.md
Outdated
| - server: accept only non-negative integers for batch size and refetch interval (close #5653) (#5759) | ||
| - server: fix bug which arised when renaming a table which had a manual relationship defined (close #4158) | ||
| - server: limit the length of event trigger names (close #5786) | ||
| - server: Configurable websocket keep-alive interval (fix #3539) |
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.
Would be good to add the flag and env variable here.
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.
hey @tirumaraiselvan changelog.md is updated 👍
CHANGELOG.md
Outdated
| - server: accept only non-negative integers for batch size and refetch interval (close #5653) (#5759) | ||
| - server: fix bug which arised when renaming a table which had a manual relationship defined (close #4158) | ||
| - server: limit the length of event trigger names (close #5786) | ||
| - server: Configurable websocket keep-alive interval. Add `--websockets-keepalive` command-line flag |
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.
Can we call it --websocket-keepalive as it is more natural and consistent with the ENV var?
server/src-lib/Hasura/Server/Init.hs
Outdated
| , "log_level" J..= soLogLevel so | ||
| , "plan_cache_options" J..= soPlanCacheOptions so | ||
| , "websocket_compression_options" J..= show (WS.connectionCompressionOptions . soConnectionOptions $ so) | ||
| , "websockets_keep_alive" J..= show (soWebsocketKeepAlive so) |
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 should also be websocket_keep_alive :)
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.
omg what else did I forgot :)
tirumaraiselvan
left a comment
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.
Approved changelog.
commented for a small typo if you could change it but no biggies.
Thanks!
|
@v0d1ch Thank you so much for accepting all our nitpicking, and fixing things without a single delay! I do promise we're usually more pragmatic :-) |
Naaah, it was a pleasure |
|
(We just merged #6126 which adds some code linting requirements to the CI. These ended up raising warnings in this PR unrelated to your changes, thus blocking the merging of this work. I've taken the liberty to fix this on your PR right away.) |
|
Beep boop! 🤖 Awesome work @v0d1ch! All of us at Hasura ❤️ what you did. Thanks again 🤗 |
Accept new server flag --websocket-keepalive to control websockets keep-alive interval Co-authored-by: Auke Booij <auke@hasura.io> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Accept new server flag
--websocket-keepaliveto control keep-alive intervalclose #3539