Alerting: Mark AM configuration as applied (#61330)

* Mark AM configuration as applied

* add missing checks, make linter happy

* fix deadlock, mark as valid on save and on load

* mark configurations only if needed

* check error after applyConfig()

* code review comments

* code review changes

* more code review changes

* clean HistoricConfigFromAlertConfig function
This commit is contained in:
Santiago
2023-02-02 14:45:17 -03:00
committed by GitHub
parent 6ad1cfef38
commit ba731f7865
11 changed files with 287 additions and 64 deletions

View File

@@ -27,6 +27,7 @@ type AlertingStore interface {
SaveAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, callback SaveCallback) error
UpdateAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
MarkConfigurationAsApplied(ctx context.Context, cmd *models.MarkConfigurationAsAppliedCmd) error
}
// DBstore stores the alert definitions and instances in the database.