-
Notifications
You must be signed in to change notification settings - Fork 813
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
move StateAllocationFilter to stable #3238
move StateAllocationFilter to stable #3238
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ashutosji The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build Failed 😱 Build Id: 39f18679-2c84-4882-a8ab-fd2b5093cc29 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 34af16e5-21a4-4164-8bd5-b273e4bf67ac To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
I see a couple of failing tests - Are they also failing for you locally? Are you able to reproduce the issues? |
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.
Good start! Gave you some direction on how to tidy it up.
Haven't looked into why the tests are failing, but let us know what you find and we'll narrow it down if you are struggling with it.
c.matcher = readyOrAllocatedGameServerMatcher | ||
} | ||
|
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.
We could clean up up more, and replace the matcher above on line 66 directly with the readyOrAllocatedGameServerMatcher -- and we could delete the readyGameServerMatcher
function entirely.
(There's possibly a good reason to get rid of matcher
as a data structure entirely, since we don't need to switch it out at runtime anymore).
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.
Yeah, I forgot it. Thanks for reminding i will correct that.
runtime.FeatureTestMutex.Lock() | ||
defer runtime.FeatureTestMutex.Unlock() |
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.
runtime.FeatureTestMutex.Lock() | |
defer runtime.FeatureTestMutex.Unlock() |
Since we have no feature flags set, we don't need the mutex anymore.
We do this because Go tests run in parallel, but feature flags are stored globally, so this allows us to have tests that don't collide. No feature flags here anymore means we don't need the mutex anymore!
@@ -94,7 +94,7 @@ func TestFindGameServerForAllocationPacked(t *testing.T) { | |||
{ObjectMeta: metav1.ObjectMeta{Name: "gs6", Namespace: "does-not-apply", Labels: oneLabel}, Status: agonesv1.GameServerStatus{NodeName: "node1", State: agonesv1.GameServerStateReady}}, | |||
}, | |||
test: func(t *testing.T, list []*agonesv1.GameServer) { | |||
assert.Len(t, list, 3) | |||
assert.Len(t, list, 5) |
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.
Just checking why the change 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.
The reason of changing 3 to 5 was the actual and expected outcome was differing. Correct me if i am wrong in assert.Len() function we are passing length as gameserver with state in GameServerStateReady?
@@ -6,8 +6,7 @@ weight: 70 | |||
description: > | |||
How to run multiple concurrent game sessions in a single GameServer process. | |||
--- | |||
{{< beta title="Allocation State Filter" gate="StateAllocationFilter" >}} | |||
|
|||
{{% feature publishVersion="1.32.0" %}} |
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.
What we would want to do here instead is use feature expiryVersion
to wrap the beta
shortcode - since we want to remove it up until the next release.
The way it is currently would mean that as soon as we pushed this live, the whole block of docs would be removed.
@@ -10,7 +10,6 @@ description: > | |||
{{< alpha | |||
title="Player Tracking and Allocation Player Filter" | |||
gate="PlayerTracking,PlayerAllocationFilter" >}} | |||
{{< beta title="Allocation State Filter" gate="StateAllocationFilter" >}} |
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.
Same as above - need to wrap this in a feature shortcode to expire it on the next version, so it doesn't get removed immediately (docs get published immediately on merge to main
).
@@ -36,8 +36,6 @@ spec: | |||
game: my-game | |||
matchExpressions: | |||
- {key: tier, operator: In, values: [cache]} | |||
# [Stage:Beta] | |||
# [FeatureFlag:StateAllocationFilter] |
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.
All this will need to be feature code wrapped.
|
Just touching base to see if you need a hand here. If not no worries, but figured I would check. |
Closing this PR now, and will handle this issue in a different PR - #3308 |
What type of PR is this?
What this PR does / Why we need it:
Which issue(s) this PR fixes:
Closes ##3096
Special notes for your reviewer: