-
Notifications
You must be signed in to change notification settings - Fork 817
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
Add WebSocket capability to WatchGameServer REST API #1999
Conversation
Build Failed 😱 Build Id: dc3a399c-eec3-4c9c-8900-370d631bb6d2 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
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 looks cool! 😄 🥳
So in regards to test, there are integration tests - they are bit janky, because reasons.
The entry point for the REST tests are here:
- https://github.com/googleforgames/agones/blob/main/build/includes/sdk.mk#L177-L183
- https://github.com/googleforgames/agones/blob/main/build/build-sdk-images/restapi/sdktest.sh
So you can run them locally with make run-sdk-conformance-test-rest
🤔 since the REST sdk test already covers the watch
event might want to have a specific test folder just for this websocket watch api, rather than try and integrate it with the REST test, as each integration test suite just does a "did this run at least once" check.
It could likely just be a bash command, if we can connect via curl?
Let me know if that list of comments made sense, and if I can point you in the right direction from there 👍
(Shame Unreal won't let you put in place http request interception middleware. Unity will 🤭 )
Looks like you also ran into some linting issues. If you want to run our linter locally: See: https://github.com/googleforgames/agones/blob/main/build/README.md |
Build Failed 😱 Build Id: 167791c2-5731-4d78-912c-3f81966362cd To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
502d770
to
480dc23
Compare
Build Succeeded 👏 Build Id: fa8ca696-b244-4b09-ae36-3b5c88eeaced The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: f028ae7d-1a72-4d93-a9fb-cdf0e57c800f The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Failed 😱 Build Id: 68f31e82-e199-4daf-8b59-f536cc349aa8 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: 07610ae9-6b8f-4006-b6d1-903a254d1f30 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Thanks for your comments and guidance - I believe I've addressed all the issues found so far. Let me know if you see anything else! |
Build Succeeded 👏 Build Id: ba46569f-79a7-4144-806e-d18e27bff33c The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Haven't forgotten about this - will review tomorrow 👍 |
d8747ab
to
579cf3d
Compare
No problem! I'm not in a hurry - I can use this code and I've got the Unreal plugin addition written but I have a hard dependency on #1944 being merged before I PR that because I'm on 4.26. |
Build Succeeded 👏 Build Id: 95ff1b3f-823f-47c3-ba6e-c2b852087acd The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
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.
One minor nit on the new file, but otherwise, this is good to go 👍
This allows clients such as Unreal that support websockets but not HTTP partial reads, to use streams such as the GameServer watch endpoint.
8f04bfb
to
606eb17
Compare
I have also squashed this into a single commit, so it should be good to go now. |
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.
Awesome.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: highlyunavailable, markmandel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build Succeeded 👏 Build Id: 93fc1854-4deb-4c01-bdef-19f1588d249d The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: 0b4804c3-92ec-4f02-8bcf-585ee52b2bc3 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind feature
What this PR does / Why we need it:
This PR adds a websocket proxy for the streaming endpoint
/watch/gameserver
. This allows clients that do not support reading from HTTP streams before they are complete, but do support WebSocket streaming (e.g. Unreal) to use the/watch/gameserver
endpoint to stream changes.Which issue(s) this PR fixes:
No issue, but I do want to use this to contribute to the Unreal plugin to add game server watch capabilities.
Special notes for your reviewer:
The PR is split up into multiple commits. I'm unsure as to what the correct practice is for go vendoring, but it wouldn't build without me running
go mod vendor
, so that is included as its own commit.I'm also not sure how I'd test this - it work in manual tests of course but it doesn't appear there are any REST API tests in the first place so I'm not quite sure where to add them if it's needed.