agones icon indicating copy to clipboard operation
agones copied to clipboard

sdkserver UpdateList does not respect gameservers.lists.maxItems

Open igooch opened this issue 3 months ago • 3 comments

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.

igooch avatar Sep 22 '25 20:09 igooch

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?

miai10 avatar Sep 24 '25 19:09 miai10

Correct, I'll update the title and description to make it clearer that this only applies to UpdateList.

igooch avatar Sep 24 '25 22:09 igooch

'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 '

github-actions[bot] avatar Nov 01 '25 10:11 github-actions[bot]