Promote `CountsAndLists` Feature Gate from Beta to Stable
What does this feature do?
CountsAndLists provides generic integer counter and string-list tracking on GameServers. It enables:
- Declaring named counters (integer) and lists (up to 1000 string values) on a GameServer at creation time
- Reading/updating those values via the SDK (
GetCounter,UpdateCounter,GetList,UpdateList,AddListValue,RemoveListValue) - Filtering GameServerAllocations based on counter/list capacity and priorities
- Fleet auto-scaling driven by available counter/list capacity
- Aggregated counter/list status rolled up to Fleet and GameServerSet
All SDK methods for this feature live in the beta SDK packages today (Go: sdks/go/beta.go, C#: sdks/csharp/sdk/Beta.cs, Rust: sdks/rust/src/beta.rs, Unity: sdks/unity/AgonesBetaSdk.cs).
Current state: Beta (enabled by default since v1.41.0)
⚠️ This is a large, cross-cutting change. It should be broken into multiple PRs to keep reviews manageable. A suggested breakdown is at the bottom of this issue.
Acceptance Criteria / Tasks
- Manual audit: Before starting, grep the repo for
FeatureCountsAndListsandCountsAndListsto confirm all usage sites (~378 occurrences today)
Feature gate removal
- API validation — Remove
FeatureCountsAndListsguards; fold to always-permitted:pkg/apis/agones/v1/gameserver.go— allow Counters/Lists fields unconditionallypkg/apis/agones/v1/fleet.go— allow Priorities unconditionallypkg/apis/agones/v1/gameserverset.go— allow Priorities unconditionallypkg/apis/autoscaling/v1/fleetautoscaler.go— allow CounterPolicy/ListPolicy unconditionallypkg/apis/allocation/v1/gameserverallocation.go— allow Counters/Lists/Priorities unconditionally
- Controllers — Always aggregate counter/list status:
pkg/gameserversets/controller.gopkg/fleets/controller.go
- Allocation — Remove gates from counter/list matching, sorting, and cache population:
pkg/gameserverallocations/allocator.go,allocation_cache.go,find.go,converter.go
- Fleet autoscaler —
pkg/fleetautoscalers/fleetautoscalers.go— remove CounterPolicy/ListPolicy gate - Sorting —
pkg/gameserversets/gameserversets.go— remove priority-sorting gate - Metrics —
pkg/metrics/controller.go— remove counter metric gate - SDK Server — Remove feature gate checks from all Counter/List RPC handlers in
pkg/sdkserver/sdkserver.goandpkg/sdkserver/localsdk.go
SDK promotion
Per the Agones SDK stability policy: when a Beta SDK feature graduates to Stable at release X, the Beta surface is marked deprecated at release X and removed 5 releases later.
- Copy Counter/List RPC definitions from
proto/sdk/beta/beta.protointoproto/sdk/sdk.proto— do not remove them frombeta.protoyet - Run
make gen-all-sdk-grpcto regenerate all SDK artifacts (stable stubs now exist alongside beta stubs) - For each language (Go, C#, Rust, Unity): add stable SDK implementations; mark the Beta SDK methods as deprecated in the beta files
- Update
[Stage:Beta]/[FeatureFlag:CountsAndLists]annotations in proto and SDK files to reflect stable status - Open a follow-up issue to remove the
beta.protodefinitions and beta implementations ~5 releases after this graduation
Config & docs
-
pkg/util/runtime/features.go— MoveFeatureCountsAndListsto// Stable features(keep infeatureDefaultsastrue) -
install/helm/agones/defaultfeaturegates.yaml— Move to Stable section -
build/Makefile— Remove fromBETA_FEATURE_GATES -
cloudbuild.yaml— RemoveCountsAndLists=falsefrom the inverted e2e config -
site/content/en/docs/Guides/feature-stages.md— Move row from Beta → Stable table -
site/content/en/docs/Guides/counters-and-lists.md— Remove Beta stage references -
site/content/en/docs/Installation/upgrading.md— Fill in the "Stable" column forGetCounter,UpdateCounter,GetList,UpdateList,AddListValue,RemoveListValuein the SDK API stability table with the graduation release version -
test/upgrade/versionMap.yaml— Add stable-gates entry for this release
Tests
- Remove
FeatureCountsAndListsskip guards from e2e tests:TestCounters,TestLists,TestCounterAndListGameServerAllocation,TestFleetAggregatedCounterStatus,TestFleetAggregatedListStatus, and all Counter/List autoscaler tests intest/e2e/ - Remove unit test feature-gate guards in
pkg/gameserversets/,pkg/fleetautoscalers/,pkg/gameserverallocations/
Suggested PR breakdown
Given the size of this work, splitting across multiple PRs is strongly recommended:
- PR 1 — API validation + tests: Remove gates from the five validation webhook files and their unit tests
- PR 2 — Controllers, allocation, autoscaler, metrics, sorting + tests: All the controller and allocation logic gate removal
- PR 3 — SDK server gate removal: Remove
FeatureCountsAndListschecks frompkg/sdkserver/sdkserver.goandpkg/sdkserver/localsdk.go - PR 4 — SDK proto + codegen: Copy Counter/List RPC definitions from
beta.protointosdk.proto(leavingbeta.protointact); runmake gen-all-sdk-grpcso stable stubs now exist alongside beta stubs — must land before per-language PRs - PR 5 (Go), PR 6 (C#), PR 7 (Rust), PR 8 (Unity) — Per-language SDK promotion: Add stable implementations; mark beta methods as deprecated in each language's beta file (do not delete yet — removal comes ~5 releases later via a follow-up issue)
- PR 9 — Config & docs:
features.go, Helm, Makefile, cloudbuild, feature-stages, counters-and-lists guide, upgrading.md SDK table, versionMap (can land any time after PRs 1–3 are merged)
Verification
make lint test-gopasses with noCountsAndLists-gated skips- E2E tests
TestCounters,TestLists, and all Counter/List allocation/autoscaler tests run without skip guards - A GameServer with counters/lists defined can be created without setting the feature gate
- Setting
CountsAndLists=trueorCountsAndLists=falsein the feature gate string must not cause a parse error (covered by keeping the const infeatureDefaults) make gen-all-sdk-grpcproduces no unexpected diff after the proto promotion
Source: agones-dev/agones