Skip to content

sdkserver UpdateList does not respect gameservers.lists.maxItems #4282

@igooch

Description

@igooch

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).

if in.List.Capacity < 0 || in.List.Capacity > apiserver.ListMaxCapacity {
return nil, errors.Errorf("out of range. Capacity must be within range [0,1000]. Found Capacity: %d", in.List.Capacity)
}

ListMaxCapacity = int64(1000)
. 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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions