siren icon indicating copy to clipboard operation
siren copied to clipboard

Updating receiver type can cause invalid subscription state

Open whoAbhishekSah opened this issue 4 years ago • 0 comments

Each subscription has a set of receivers and configurations according to the type of receives. e.g. A valid subscription.

    "id": "119",
    "urn": "test-subscription",
    "namespace": "10",
    "receivers": [
        {
            "id": "1",
            "configuration": {
                "channel_name": "general"
            }
        },
        {
            "id": "2"
        }
    ],
    "match": {
        "c": "d"
    },
}

This means the receiver with id: 1 is supposed to be of slack type. But someone can just update this Receiver to some other type(e.g. Pagerduty) with the id intact. As a result, syncing this config to upstream(e.g. alertmanager will start failing). We should avoid this accidental change, causing an invalid state.

whoAbhishekSah avatar Dec 02 '21 11:12 whoAbhishekSah