siren
siren copied to clipboard
Updating receiver type can cause invalid subscription state
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.