From 5e0cb18075b586f625901dfae2236661fa235f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Thu, 6 Jul 2017 22:28:14 -0700 Subject: [PATCH] Correctly seed alert fingerprints Then need to be set after creating the alert --- mapper/v04/alerts.go | 1 + mapper/v05/alerts.go | 1 + mapper/v061/alerts.go | 1 + mapper/v062/alerts.go | 1 + 4 files changed, 4 insertions(+) diff --git a/mapper/v04/alerts.go b/mapper/v04/alerts.go index 65bed864f..2e79e6728 100644 --- a/mapper/v04/alerts.go +++ b/mapper/v04/alerts.go @@ -114,6 +114,7 @@ func (m AlertMapper) GetAlerts(uri string, timeout time.Duration) ([]models.Aler } sort.Strings(a.InhibitedBy) sort.Strings(a.SilencedBy) + a.UpdateFingerprints() alertList = append(alertList, a) } ug := models.AlertGroup{ diff --git a/mapper/v05/alerts.go b/mapper/v05/alerts.go index 228acd669..3c0f7e7ff 100644 --- a/mapper/v05/alerts.go +++ b/mapper/v05/alerts.go @@ -113,6 +113,7 @@ func (m AlertMapper) GetAlerts(uri string, timeout time.Duration) ([]models.Aler } sort.Strings(a.InhibitedBy) sort.Strings(a.SilencedBy) + a.UpdateFingerprints() alertList = append(alertList, a) } ug := models.AlertGroup{ diff --git a/mapper/v061/alerts.go b/mapper/v061/alerts.go index 938d0648d..1afe923f1 100644 --- a/mapper/v061/alerts.go +++ b/mapper/v061/alerts.go @@ -112,6 +112,7 @@ func (m AlertMapper) GetAlerts(uri string, timeout time.Duration) ([]models.Aler } sort.Strings(a.InhibitedBy) sort.Strings(a.SilencedBy) + a.UpdateFingerprints() alertList = append(alertList, a) } ug := models.AlertGroup{ diff --git a/mapper/v062/alerts.go b/mapper/v062/alerts.go index f169cfec9..8fa6b2693 100644 --- a/mapper/v062/alerts.go +++ b/mapper/v062/alerts.go @@ -116,6 +116,7 @@ func (m AlertMapper) GetAlerts(uri string, timeout time.Duration) ([]models.Aler } sort.Strings(a.InhibitedBy) sort.Strings(a.SilencedBy) + a.UpdateFingerprints() alertList = append(alertList, a) } ug := models.AlertGroup{