Skip to content

Beta: UpdateList using Agones 1.41 rest API doesn't update the data in the selected list #3870

@Tsm012

Description

@Tsm012

What happened:
Attempting to use the Lists features in Agones 1.41. I have a fleet deployed in agones and am attempting to use the:

curl -d '{"capacity": "120", "values": ["player3", "player4"]}' -H "Content-Type: application/json" -X PATCH http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

call as mentioned in the rest documentation. The list is declared on our "kind: Fleet" resource and declares a list players

lists:
  players:
    capacity: 20
    values:
    - player1
    - player2
    - player3

Once the fleet is deployed, I can run the command:

curl -H "Content-Type: application/json" -X GET http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

and will get the correct response.

{"name":"players","capacity":"20","values":["player1","player2","player3"]}

When I go to update that same list using the command:

curl -d '{"capacity": "20", "values": ["player3", "player4"]}' -H "Content-Type: application/json" -X PATCH http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

I get the response:

{"name":"","capacity":"0","values":[]}

I then check again to see if my list was updated:

curl -H "Content-Type: application/json" -X GET http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

but the reply seems to indicate nothing has changed.

{"name":"players","capacity":"20","values":["player1","player2","player3"]}

What you expected to happen:

I expected the list up update to reflect the data payload of

{"capacity": "20", "values": ["player3", "player4"]}

How to reproduce it (as minimally and precisely as possible):

Create a Fleet resource in agones and deploy it with a list declared as:

lists:
  players:
    capacity: 20
    values:
    - player1
    - player2
    - player3

shell into a game server in the fleet just deployed and verify that your initial values are in the list

curl -H "Content-Type: application/json" -X GET http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

{"name":"players","capacity":"20","values":["player1","player2","player3"]}

Attempt to update the list with new values

curl -d '{"capacity": "20", "values": ["player3", "player4"]}' -H "Content-Type: application/json" -X PATCH http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

after running the update list call, confirm that the list has not changed

curl -H "Content-Type: application/json" -X GET http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/lists/players

{"name":"players","capacity":"20","values":["player1","player2","player3"]}

Anything else we need to know?:

Environment:

  • Agones version: 1.41
  • Kubernetes version (use kubectl version): 1.29
  • Cloud provider or hardware configuration: AWS EKS
  • Install method (yaml/helm): Helm
  • Troubleshooting guide log(s):
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions