-
Notifications
You must be signed in to change notification settings - Fork 895
Proposal: Remove PlayerTracking Alpha Feature #4491
Description
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
FeaturePlayerTrackingandFeaturePlayerAllocationFilterfrompkg/util/runtime/features.go - Remove both from
install/helm/agones/defaultfeaturegates.yaml - Remove both from
build/Makefile(ALPHA_FEATURE_GATES) - Remove both from
cloudbuild.yamle2e test configuration
GameServer API / CRD
- Remove
PlayersSpecandPlayerStatustypes frompkg/apis/agones/v1/gameserver.go - Remove
playersfield fromGameServer.SpecandGameServer.Status - Remove associated validation
- Remove
playersfield from CRD schema templates ininstall/helm/agones/templates/crds/
GameServerAllocation API / Proto
- Remove
PlayerSelectormessage andplayersfield fromproto/allocation/allocation.proto - Remove
PlayerSelectortype andPlayersfield frompkg/apis/allocation/v1/gameserverallocation.go - Remove player filtering from
GameServerSelector.Matches(),ApplyDefaults(), andValidate() - Remove proto ↔ k8s API conversion of
PlayerSelectorinpkg/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,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.go
Tests
- Remove e2e tests gated on
FeaturePlayerTrackingintest/e2e/gameserver_test.goandtest/e2e/fleet_test.go - Remove e2e tests gated on
FeaturePlayerAllocationFilterintest/e2e/gameserverallocation_test.go - Remove unit tests for
PlayerSelectorinpkg/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
PlayerTrackingandPlayerAllocationFilterfromtest/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.yamlplayersselector block - Remove commented PlayerTracking example from
examples/gameserver.yaml - Audit
examples/autoscaler-wasm/model.gofor any PlayerTracking dependency
Verify no missed items
- Run a final grep for
PlayerTracking,PlayerAllocationFilter,PlayersSpec,PlayerStatus,
PlayerSelector, andAggregatedPlayerStatusacross the repo to catch anything not listed above
Questions for the Community
- Is anyone still actively using
PlayerTrackingwho has not yet migrated? - Are there any gaps in the CountsAndLists migration path that would block removal?