Alerting: Publish event when one or more rules are created or changed (#93637)

* Publish event when one or more rules are changed

* Publish affected rules

* Use a fake bus to test publish event without listening

* Wire alerting store into provisioning service
This commit is contained in:
William Wernert
2024-10-11 12:19:52 -04:00
committed by GitHub
parent 18e66d22b1
commit 19a9a79467
14 changed files with 238 additions and 114 deletions
@@ -782,7 +782,7 @@ func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Servi
fakeAccessControlService := actest.FakeService{}
alertMetrics := metrics.NewNGAlert(prometheus.NewRegistry())
ruleStore, err := ngalertstore.ProvideDBStore(cfg, featureToggles, sqlStore, mockFolder, dashboardService, fakeAccessControl)
ruleStore, err := ngalertstore.ProvideDBStore(cfg, featureToggles, sqlStore, mockFolder, dashboardService, fakeAccessControl, bus)
require.NoError(t, err)
ng, err := ngalert.ProvideService(