Skip to content

Rest UpdateCounter not returning correct values #4220

@hloeffler

Description

@hloeffler

What happened:
api is returning wrong data for UpdateCounter

What you expected to happen:
Get current count and capacity
but got:

{"name":"","count":"0","capacity":"0"}

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

curl -sSd '{"count": "5'", "capacity": "64"}' -H "Content-Type: application/json" -X PATCH http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/counters/players

Anything else we need to know?:
both return the right data:

curl http://localhost:${AGONES_SDK_HTTP_PORT}/v1beta1/counters/players

->

{"name":"players","count":"39","capacity":"64"}
curl http://localhost:${AGONES_SDK_HTTP_PORT}/gameserver

->

    "ports": [
      {
        "name": "test",
        "port": 13743
      }
    ],
    "players": null,
    "counters": {
      "players": {
        "count": "58",
        "capacity": "64"
      }
    },
    "lists": {}

Environment:

  • Agones version: 1.49.0

Metadata

Metadata

Assignees

Labels

awaiting-maintainerBlock issues from being stale/obsolete/closedkind/bugThese are bugs.stalePending closure unless there is a strong objection.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions