sdkserver UpdateList does not respect gameservers.lists.maxItems
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.
Indeed.
But if I understand correctly, this issue manifests itself only if the list is updated from the game server, right? Adding, removing should be fine, right?
Correct, I'll update the title and description to make it clearer that this only applies to UpdateList.
'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '