Skip to content

Add a new entry in the map endpoint checks for duplicates and Add a new payload does not #257

Open
@linoor

Description

@linoor

Hello,

I've noticed that when I try to add an entry multiple times to a map file with POST http://{{url}}/v2/services/haproxy/runtime/maps_entries?map=routing.map endpoint I will get:

{
    "code": 409,
    "message": "already exists"
}

However, if I use POST http://{{url}}/v2/services/haproxy/runtime/maps/routing.map multiple times, the uniqueness check doesn't seem to be performed and Return one map runtime entries returns duplicates:

{
    {
        "id": "0xffffaf6ccdb0",
        "key": "host1",
        "value": "server1"
    },
    {
        "id": "0xffffaf6cce50",
        "key": "host2",
        "value": "server2"
    },
    {
        "id": "0xffffaf6cdef0",
        "key": "host1",
        "value": "server1"
    },
    {
        "id": "0xffffaf6cdf90",
        "key": "host2",
        "value": "server2"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions