Summary
The PlayerTracking feature has been at Alpha (disabled by default) since Agones 1.6.0.
CountsAndLists — a superset replacement — has been at Beta (enabled by default) since 1.41.0
and has been stable there for a significant period. The player-tracking docs already carry a
deprecation notice pointing users to CountsAndLists.
Given that CountsAndLists covers all PlayerTracking use cases and more, and that we are unlikely
to revert CountsAndLists, I'd like to propose that we remove PlayerTracking (and the companion
PlayerAllocationFilter Alpha feature, which depends on it) in the near future. That said,
looking for general consensus before moving forward.
Motivation
PlayerTracking (Alpha, disabled) has had no meaningful changes in years and predates the
generalized CountsAndLists approach.
CountsAndLists (Beta, enabled) fully supersedes it: player IDs map to list values, player
count/capacity map to counter count/capacity.
- Keeping PlayerTracking adds maintenance burden across the codebase, SDK, docs, and tests
with no benefit for new users.
- The existing docs already direct users to migrate:
"Counters and Lists replaces the Alpha functionality of Player Tracking, and Player Tracking
will soon be removed from Agones."
Migration Path
Users would migrate to CountsAndLists. The mapping is straightforward:
| PlayerTracking |
CountsAndLists equivalent |
spec.players.initialCapacity |
spec.counters["players"].capacity |
status.players.count |
status.counters["players"].count |
status.players.capacity |
status.counters["players"].capacity |
status.players.ids |
status.lists["players"].values |
PlayerAllocationFilter (players selector in GameServerAllocation) |
counters/lists selectors in GameServerAllocation |
SDK.Alpha().PlayerConnect(id) |
SDK.Beta().AppendListValue("players", id) |
SDK.Alpha().PlayerDisconnect(id) |
SDK.Beta().DeleteListValue("players", id) |
SDK.Alpha().SetPlayerCapacity(n) |
SDK.Beta().SetListCapacity("players", n) |
SDK.Alpha().GetPlayerCapacity() |
SDK.Beta().GetListCapacity("players") |
SDK.Alpha().GetPlayerCount() |
SDK.Beta().ListLength("players") |
SDK.Alpha().IsPlayerConnected(id) |
check SDK.Beta().GetList("players").values |
SDK.Alpha().GetConnectedPlayers() |
SDK.Beta().GetList("players").values |
Scope (if we proceed)
Full list of changes required
Feature Gates
- Remove
FeaturePlayerTracking and FeaturePlayerAllocationFilter from pkg/util/runtime/features.go
- Remove both from
install/helm/agones/defaultfeaturegates.yaml
- Remove both from
build/Makefile (ALPHA_FEATURE_GATES)
- Remove both from
cloudbuild.yaml e2e test configuration
GameServer API / CRD
- Remove
PlayersSpec and PlayerStatus types from pkg/apis/agones/v1/gameserver.go
- Remove
players field from GameServer.Spec and GameServer.Status
- Remove associated validation
- Remove
players field from CRD schema templates in install/helm/agones/templates/crds/
GameServerAllocation API / Proto
- Remove
PlayerSelector message and players field from proto/allocation/allocation.proto
- Remove
PlayerSelector type and Players field from pkg/apis/allocation/v1/gameserverallocation.go
- Remove player filtering from
GameServerSelector.Matches(), ApplyDefaults(), and Validate()
- Remove proto ↔ k8s API conversion of
PlayerSelector in pkg/allocation/converters/converter.go
- Remove player capacity sort logic from
pkg/gameserverallocations/allocation_cache.go
SDK (Alpha methods)
Remove from all SDK implementations (Go, C#, Node.js, Rust, Unity, Unreal):
PlayerConnect, PlayerDisconnect, SetPlayerCapacity, GetPlayerCapacity,
GetPlayerCount, IsPlayerConnected, GetConnectedPlayers, and corresponding RPC
definitions in proto/sdk/alpha/alpha.proto
Controller / SDK Server
- Remove player tracking logic from
pkg/sdkserver/
- Remove player-tracking-specific metrics (
agones_gameserver_player_connected_total,
agones_gameserver_player_capacity_total)
Generated Code (regenerate after above changes)
pkg/apis/agones/v1/zz_generated.deepcopy.go — PlayersSpec, PlayerStatus, AggregatedPlayerStatus
pkg/apis/allocation/v1/zz_generated.deepcopy.go — PlayerSelector in GameServerSelector
pkg/allocation/go/allocation.pb.go — generated protobuf for allocation proto
pkg/client/applyconfiguration/agones/v1/ — playersspec.go, playerstatus.go, aggregatedplayerstatus.go
Tests
- Remove e2e tests gated on
FeaturePlayerTracking in test/e2e/gameserver_test.go and test/e2e/fleet_test.go
- Remove e2e tests gated on
FeaturePlayerAllocationFilter in test/e2e/gameserverallocation_test.go
- Remove unit tests for
PlayerSelector in pkg/apis/allocation/v1/gameserverallocation_test.go
- Remove unit tests in
pkg/gameserverallocations/ (allocation_cache_test.go, find_test.go, allocator_test.go)
- Remove converter tests in
pkg/allocation/converters/converter_test.go
- Remove
PlayerTracking and PlayerAllocationFilter from test/upgrade/versionMap.yaml
Documentation
- Remove
site/content/en/docs/Guides/player-tracking.md
- Remove PlayerTracking and PlayerAllocationFilter rows from
site/content/en/docs/Guides/feature-stages.md
- Remove player-tracking metrics from
site/content/en/docs/Guides/metrics.md
- Remove/update
site/content/en/docs/Integration Patterns/player-capacity.md (references both feature gates)
- Remove Alpha player tracking methods from SDK reference docs (C#, REST, Node.js, Rust,
_index.md)
Examples
- Remove
examples/gameserverallocation.yaml players selector block
- Remove commented PlayerTracking example from
examples/gameserver.yaml
- Audit
examples/autoscaler-wasm/model.go for any PlayerTracking dependency
Verify no missed items
- Run a final grep for
PlayerTracking, PlayerAllocationFilter, PlayersSpec, PlayerStatus,
PlayerSelector, and AggregatedPlayerStatus across the repo to catch anything not listed above
Questions for the Community
- Is anyone still actively using
PlayerTracking who has not yet migrated?
- Are there any gaps in the CountsAndLists migration path that would block removal?
Summary
The
PlayerTrackingfeature has been at Alpha (disabled by default) since Agones 1.6.0.CountsAndLists— a superset replacement — has been at Beta (enabled by default) since 1.41.0and has been stable there for a significant period. The player-tracking docs already carry a
deprecation notice pointing users to CountsAndLists.
Given that CountsAndLists covers all PlayerTracking use cases and more, and that we are unlikely
to revert CountsAndLists, I'd like to propose that we remove PlayerTracking (and the companion
PlayerAllocationFilterAlpha feature, which depends on it) in the near future. That said,looking for general consensus before moving forward.
Motivation
PlayerTracking(Alpha, disabled) has had no meaningful changes in years and predates thegeneralized CountsAndLists approach.
CountsAndLists(Beta, enabled) fully supersedes it: player IDs map to list values, playercount/capacity map to counter count/capacity.
with no benefit for new users.
Migration Path
Users would migrate to
CountsAndLists. The mapping is straightforward:spec.players.initialCapacityspec.counters["players"].capacitystatus.players.countstatus.counters["players"].countstatus.players.capacitystatus.counters["players"].capacitystatus.players.idsstatus.lists["players"].valuesPlayerAllocationFilter(playersselector inGameServerAllocation)counters/listsselectors inGameServerAllocationSDK.Alpha().PlayerConnect(id)SDK.Beta().AppendListValue("players", id)SDK.Alpha().PlayerDisconnect(id)SDK.Beta().DeleteListValue("players", id)SDK.Alpha().SetPlayerCapacity(n)SDK.Beta().SetListCapacity("players", n)SDK.Alpha().GetPlayerCapacity()SDK.Beta().GetListCapacity("players")SDK.Alpha().GetPlayerCount()SDK.Beta().ListLength("players")SDK.Alpha().IsPlayerConnected(id)SDK.Beta().GetList("players").valuesSDK.Alpha().GetConnectedPlayers()SDK.Beta().GetList("players").valuesScope (if we proceed)
Full list of changes required
Feature Gates
FeaturePlayerTrackingandFeaturePlayerAllocationFilterfrompkg/util/runtime/features.goinstall/helm/agones/defaultfeaturegates.yamlbuild/Makefile(ALPHA_FEATURE_GATES)cloudbuild.yamle2e test configurationGameServer API / CRD
PlayersSpecandPlayerStatustypes frompkg/apis/agones/v1/gameserver.goplayersfield fromGameServer.SpecandGameServer.Statusplayersfield from CRD schema templates ininstall/helm/agones/templates/crds/GameServerAllocation API / Proto
PlayerSelectormessage andplayersfield fromproto/allocation/allocation.protoPlayerSelectortype andPlayersfield frompkg/apis/allocation/v1/gameserverallocation.goGameServerSelector.Matches(),ApplyDefaults(), andValidate()PlayerSelectorinpkg/allocation/converters/converter.gopkg/gameserverallocations/allocation_cache.goSDK (Alpha methods)
Remove from all SDK implementations (Go, C#, Node.js, Rust, Unity, Unreal):
PlayerConnect,PlayerDisconnect,SetPlayerCapacity,GetPlayerCapacity,GetPlayerCount,IsPlayerConnected,GetConnectedPlayers, and corresponding RPCdefinitions in
proto/sdk/alpha/alpha.protoController / SDK Server
pkg/sdkserver/agones_gameserver_player_connected_total,agones_gameserver_player_capacity_total)Generated Code (regenerate after above changes)
pkg/apis/agones/v1/zz_generated.deepcopy.go—PlayersSpec,PlayerStatus,AggregatedPlayerStatuspkg/apis/allocation/v1/zz_generated.deepcopy.go—PlayerSelectorinGameServerSelectorpkg/allocation/go/allocation.pb.go— generated protobuf for allocation protopkg/client/applyconfiguration/agones/v1/—playersspec.go,playerstatus.go,aggregatedplayerstatus.goTests
FeaturePlayerTrackingintest/e2e/gameserver_test.goandtest/e2e/fleet_test.goFeaturePlayerAllocationFilterintest/e2e/gameserverallocation_test.goPlayerSelectorinpkg/apis/allocation/v1/gameserverallocation_test.gopkg/gameserverallocations/(allocation_cache_test.go,find_test.go,allocator_test.go)pkg/allocation/converters/converter_test.goPlayerTrackingandPlayerAllocationFilterfromtest/upgrade/versionMap.yamlDocumentation
site/content/en/docs/Guides/player-tracking.mdsite/content/en/docs/Guides/feature-stages.mdsite/content/en/docs/Guides/metrics.mdsite/content/en/docs/Integration Patterns/player-capacity.md(references both feature gates)_index.md)Examples
examples/gameserverallocation.yamlplayersselector blockexamples/gameserver.yamlexamples/autoscaler-wasm/model.gofor any PlayerTracking dependencyVerify no missed items
PlayerTracking,PlayerAllocationFilter,PlayersSpec,PlayerStatus,PlayerSelector, andAggregatedPlayerStatusacross the repo to catch anything not listed aboveQuestions for the Community
PlayerTrackingwho has not yet migrated?