Notification Template overwrites

Hi
Issue : When two different users update notification templates the most recent user’s state gets updated

Scenario: Lets say two users are concurrently working on 2 different notification templates
User A is updating Notification template A and,
the state in users A’s grafana while editing

  • Notification template A version 1 → 2
  • Notification template B version 1

User B is updating Notification template B
the state in users B’s grafana while editing

  • Notification template A version 1
  • Notification template B version 1 → 2

Lets say user B updates and saves their template
So now the grafana’s state in user B’s UI is

  • Notification template A version 1
  • Notification template B version 2

and a min later user A submits his/her update
now the version would be

  • Notification template A version 2
  • Notification template B version 1

in an ideal state it should be

  • Notification template A version 2
  • Notification template B version 2

is this cos the way the grafana submits its request to Alertmanger
the grafana get the current state from AM
{
“template_files”: “{ file1:“template”, file2:“template” }}”
}

and updates without comparing the state that is in AM and what it has in its request to update the AM config

  • is there a way to prevent this?

    • perhaps forcing grafana to pull the AM config frequently
  • Notification polices dont have version and so is the mimir or loki based alerts and are their chances that this behavior might them as well or pretty much any objects without versioning

We grafana 10.2.0, we have 2 grafana deployments one with external AM and one using the internal Alertmanger and observe this behavior in both of them