-
Notifications
You must be signed in to change notification settings - Fork 898
sdkserver UpdateList does not respect gameservers.lists.maxItems #4282
Description
A new feature was introduced #4246 to make the maximum number of items in a list configurable via the gameservers.lists.maxItems Helm value.
However, the UpdateList sdkserver still uses a hardcoded limit of 1000 (this does not apply any other List method such as AddListValue or RemoveListValue).
https://github.com/googleforgames/agones/blob/409a6fc3e96d82bda9a16fb10b6288d82c5fd356/pkg/sdkserver/sdkserver.go#L1082-L1084
https://github.com/googleforgames/agones/blob/409a6fc3e96d82bda9a16fb10b6288d82c5fd356/pkg/util/apiserver/apiserver.go#L64. The UpdateList function in pkg/sdkserver/sdkserver.go checks the capacity against apiserver.ListMaxCapacity
This means that even if a user configures a different gameservers.lists.maxItems, the SDK will still enforce a limit of 1000.
To fix this, sdkserver should be updated to retrieve the gameservers.lists.maxItems value and use it for validation and remove the apiserver.ListMaxCapacity.