Skip to content
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

Merged
merged 3 commits into from
May 19, 2020

Conversation

markmandel
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug
/kind cleanup
/kind documentation

/kind feature

/kind hotfix

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 💪

@markmandel markmandel added kind/feature New features for Agones area/tests Unit tests, e2e tests, anything to make sure things don't break labels May 15, 2020
@agones-bot
Copy link
Collaborator

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

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?

Copy link
Member Author

@markmandel markmandel May 15, 2020

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.

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1561/head:pr_1561 && git checkout pr_1561
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-4da212c

@markmandel markmandel requested review from aLekSer and roberthbailey and removed request for cyriltovena and EricFortin May 18, 2020 00:11
@@ -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.
Copy link
Member

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?

Copy link
Member Author

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
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 439ef5b1-983b-4915-9333-d65f484ad57f

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1e4e4a27-a87f-4ddd-a2e2-46e9694e4201

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5667c889-58ac-4e1a-9246-0ba16532ae70

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel markmandel added this to the 1.6.0 milestone May 18, 2020
@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1561/head:pr_1561 && git checkout pr_1561
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-53c488f

@google-oss-robot
Copy link

[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:
  • OWNERS [markmandel,roberthbailey]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1561/head:pr_1561 && git checkout pr_1561
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-dac605d

@markmandel markmandel merged commit e2542ae into googleforgames:master May 19, 2020
@markmandel markmandel deleted the feature/fleet-agg-logic branch May 19, 2020 15:57
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/tests Unit tests, e2e tests, anything to make sure things don't break kind/feature New features for Agones size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants