-
Notifications
You must be signed in to change notification settings - Fork 825
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
feat: allocation response with counters and lists data #3681
feat: allocation response with counters and lists data #3681
Conversation
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Failed 😱 Build Id: ce442ff8-0d5a-4fc6-ae41-3037a697beef To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
5d54199
to
66cf2cb
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 👏 Build Id: 2e525cfd-5707-4dd3-9806-dad09a2b8a17 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.
This looks amazing! A few of additional things I think we need to finish this off:
Let's add some e2e integration tests:
agones/test/e2e/gameserverallocation_test.go
Line 264 in 12d82a1
func TestCounterAndListGameServerAllocation(t *testing.T) { |
May be a good spot to add in some tests for allocation returns.
https://github.com/googleforgames/agones/blob/main/test/e2e/allocator_test.go
I don't think we have a test in here for Counters and Lists (@igooch did I miss a test in here?), so will have to write one -- probably only needs to be something that just checks that conversation between GameServerAllocation and the proto works.
Also, let's add some docs!
For the new docs, please wrap them in a feature
code for the next release as per https://agones.dev/site/docs/contribute/
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Thank you for your review! |
Build Succeeded 👏 Build Id: 2258167c-bfc1-4a52-bec9-cdcf28aaf437 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:
|
This is awesome! I'd definitely keep everything in allocator_test.go, my thought would be - for: agones/test/e2e/gameserverallocation_test.go Line 264 in 1c536c0
Enhance this test to also check expected return values for list and/or counter values for each test case. I think here would be the right spot: agones/test/e2e/gameserverallocation_test.go Lines 603 to 606 in 1c536c0
And I think this would be good to go - and we can squeeze this in before release next Tuesday! Very excited to see this get added! |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
@@ -589,6 +591,10 @@ func TestCounterAndListGameServerAllocation(t *testing.T) { | |||
} | |||
require.NoError(t, err) | |||
assert.Equal(t, string(testCase.wantAllocated), string(gsa.Status.State)) | |||
if gsa.Status.State == allocated { |
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 thought this test is for counters and lists selector, so I check that the status of counters and lists does not change before/after request.
Since GSA may returns UnAllocated state, check the status only if GSA state is Allocated.
Please correct me if i'm wrong.
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 makes sense to me!
Thanks for the review. |
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 LGTM!
@igooch did you wan to take a look and see if I missed anything? Otherwise, i think this is good to merge before release next week.
@@ -589,6 +591,10 @@ func TestCounterAndListGameServerAllocation(t *testing.T) { | |||
} | |||
require.NoError(t, err) | |||
assert.Equal(t, string(testCase.wantAllocated), string(gsa.Status.State)) | |||
if gsa.Status.State == allocated { |
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 makes sense to me!
Build Succeeded 👏 Build Id: 3ea62294-ae0d-4a93-9321-18e23ea2ee29 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:
|
Thank you for approval. |
fba6863
to
1db67b4
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 👏 Build Id: ea24dfbf-0e4e-4bdf-ac2b-b04cb3e1914a 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:
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Failed 😱 Build Id: 68d9ec15-3252-4c6a-aaee-d4cbb1d4d375 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Weird flake with csharp sdk
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 👏 Build Id: 1e4a92f2-c846-44dd-b928-6318beac54cf 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.
LGTM
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Currently the CountsAndLists feature does not return the status of counters and lists for GameServer Allocation requests.
This makes it difficult to know how the counters and lists in the GameServer changed before and after the request.
This PR modifies the response to return those data.
Which issue(s) this PR fixes:
Closes #3661
Special notes for your reviewer:
NA