Alerting: add collision safe update function for alertmanager configurations (#46692)

* Alerting: add collision safe update function for alertmanager configurations

* fix typo

* use bootstrap func for tests

* move hash calculation to store

* remove icons lol

* remove removed field
This commit is contained in:
Jean-Philippe Quéméner
2022-03-23 09:31:46 +01:00
committed by GitHub
parent ff3c1e3144
commit a80f04c949
6 changed files with 141 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ type AlertConfiguration struct {
ID int64 `xorm:"pk autoincr 'id'"`
AlertmanagerConfiguration string
ConfigurationHash string
ConfigurationVersion string
CreatedAt int64 `xorm:"created"`
Default bool
@@ -22,6 +23,7 @@ type GetLatestAlertmanagerConfigurationQuery struct {
// SaveAlertmanagerConfigurationCmd is the command to save an alertmanager configuration.
type SaveAlertmanagerConfigurationCmd struct {
AlertmanagerConfiguration string
FetchedConfigurationHash string
ConfigurationVersion string
Default bool
OrgID int64