-
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
Fleet Aggregate Player Tracking Logic #1561
Fleet Aggregate Player Tracking Logic #1561
Conversation
Build Failed 😱 Build Id: 8d789d15-fff4-4c46-901f-1bb44d2092ef To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
status.Players = &agonesv1.AggregatedPlayerStatus{} | ||
for _, gs := range list { | ||
if gs.ObjectMeta.DeletionTimestamp.IsZero() && | ||
(gs.Status.State == agonesv1.GameServerStateReady || |
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.
If a GS is ready or reserved, does it still have any player?
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 question 🤔
In theory it might, say leftover from a previous session, and the GameServer has gone from Allocation => Ready (or Reserved) into a pool, and the players are still connected.
I figured it made sense to err on the side of more flexible.
Build Succeeded 👏 Build Id: 9795c188-d2db-4115-ac1a-2174f1e519a2 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:
|
pkg/fleets/controller.go
Outdated
@@ -531,6 +531,17 @@ func (c *Controller) updateFleetStatus(fleet *agonesv1.Fleet) error { | |||
fCopy.Status.ReservedReplicas += gsSet.Status.ReservedReplicas | |||
fCopy.Status.AllocatedReplicas += gsSet.Status.AllocatedReplicas | |||
} | |||
if runtime.FeatureEnabled(runtime.FeaturePlayerTracking) { | |||
// to make this code simpler, we will loop around the gsSet list twice. |
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.
simpler while the feature gate is in place? Do you want to add a TODO to consolidate this with the above loop when the feature graduates to ga?
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.
simpler while the feature gate is in place?
Yeah exactly. Let me be explicit about this. Excellent idea on the TODO, doing that now.
Implementation of aggregation of Player Tracking values at the Fleet and GameServerSet levels. Includes both unit and e2e tests. Work on googleforgames#1033
4da212c
to
c7ff35c
Compare
Build Failed 😱 Build Id: 439ef5b1-983b-4915-9333-d65f484ad57f To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 1e4e4a27-a87f-4ddd-a2e2-46e9694e4201 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 5667c889-58ac-4e1a-9246-0ba16532ae70 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: 4bfdcd44-9186-4959-9468-56a4db319217 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:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, roberthbailey 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 |
New changes are detected. LGTM label has been removed. |
Build Succeeded 👏 Build Id: f2553c7c-d09a-4232-af88-6409a64aec96 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:
|
Implementation of aggregation of Player Tracking values at the Fleet and GameServerSet levels. Includes both unit and e2e tests. Work on googleforgames#1033 Co-authored-by: Robert Bailey <robertbailey@google.com>
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Implementation of aggregation of Player Tracking values at the Fleet and GameServerSet levels.
Which issue(s) this PR fixes:
Work on #1033
Special notes for your reviewer:
Includes both unit and e2e tests.
This completes the logic for player tracking 🙌
Docs are the final piece left 💪