这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Oct 28, 2020

Accept new server flag --websocket-keepalive to control keep-alive interval

close #3539

@hasura-bot
Copy link
Contributor

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! 😎

@CLAassistant
Copy link

CLAassistant commented Oct 28, 2020

CLA assistant check
All committers have signed the CLA.

@v0d1ch v0d1ch force-pushed the 3539_configurable-websocket-keep-alive-interval branch from 4cc43ef to 944693f Compare October 28, 2020 22:01
@v0d1ch v0d1ch requested a review from a team as a code owner October 28, 2020 22:01
@v0d1ch v0d1ch force-pushed the 3539_configurable-websocket-keep-alive-interval branch from 944693f to ed966c7 Compare October 28, 2020 22:02
@v0d1ch v0d1ch changed the title 3539 Configurable websocket keep alive interval 3539 server: Configurable websocket keep alive interval Oct 28, 2020
@v0d1ch v0d1ch changed the title 3539 server: Configurable websocket keep alive interval server: Configurable websocket keep alive interval Oct 28, 2020
@abooij
Copy link
Contributor

abooij commented Oct 29, 2020

@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 --websocket-keepalive CLI flag being required rather than optional.

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.

@v0d1ch v0d1ch marked this pull request as draft October 29, 2020 09:12
@v0d1ch v0d1ch force-pushed the 3539_configurable-websocket-keep-alive-interval branch 2 times, most recently from efbb189 to a3586dd Compare October 29, 2020 21:19
@netlify
Copy link

netlify bot commented Oct 29, 2020

Deploy preview for hasura-docs ready!

Built with commit a11d929

https://deploy-preview-6092--hasura-docs.netlify.app

@v0d1ch v0d1ch force-pushed the 3539_configurable-websocket-keep-alive-interval branch 2 times, most recently from d7336cd to b21a136 Compare October 29, 2020 21:26
Accept new server flag --websocket-keepalive to control
websockets keep-alive interval
@v0d1ch v0d1ch force-pushed the 3539_configurable-websocket-keep-alive-interval branch from b21a136 to 0000091 Compare October 29, 2020 22:59
@v0d1ch v0d1ch marked this pull request as ready for review October 29, 2020 23:00
@v0d1ch
Copy link
Contributor Author

v0d1ch commented Oct 30, 2020

paging DR. @abooij ! This thing is ready for review now once you find the time.

Copy link
Contributor

@abooij abooij left a 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! :-)

@abooij
Copy link
Contributor

abooij commented Oct 30, 2020

@tirumaraiselvan Could you please verify that you're happy with the CLI flags and environment variable naming? (And, as is tradition, the changelog.)

Copy link
Contributor

@abooij abooij left a 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)
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

, "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)
Copy link
Contributor

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 :)

Copy link
Contributor Author

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 :)

Copy link
Contributor

@tirumaraiselvan tirumaraiselvan left a 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!

@abooij
Copy link
Contributor

abooij commented Nov 3, 2020

@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 :-)

@v0d1ch
Copy link
Contributor Author

v0d1ch commented Nov 3, 2020

@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

@abooij
Copy link
Contributor

abooij commented Nov 3, 2020

(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.)

@abooij abooij merged commit 81e836a into hasura:master Nov 3, 2020
@hasura-bot
Copy link
Contributor

Beep boop! 🤖

GIF

Awesome work @v0d1ch! All of us at Hasura ❤️ what you did.

Thanks again 🤗

scriptonist pushed a commit to scriptonist/graphql-engine that referenced this pull request Nov 8, 2020
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable websocket keep-alive interval

5 participants