Skip to content

Commit 3a3eec9

Browse files
committed
Address review comments
Signed-off-by: gotjosh <[email protected]>
1 parent 38cd1bc commit 3a3eec9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/alertmanager/multitenant.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,7 @@ func (am *MultitenantAlertmanager) ServeHTTP(w http.ResponseWriter, req *http.Re
489489

490490
func (am *MultitenantAlertmanager) alertmanagerFromFallbackConfig(userID string) (*Alertmanager, error) {
491491
// Upload an empty config so that the Alertmanager is no de-activated in the next poll
492-
cfg := &UserConfig{AlertmanagerConfig: ""}
493-
cfgDesc := alerts.ToProto(cfg.AlertmanagerConfig, cfg.TemplateFiles, userID)
492+
cfgDesc := alerts.ToProto("", nil, userID)
494493
err := am.store.SetAlertConfig(context.Background(), cfgDesc)
495494
if err != nil {
496495
return nil, err

pkg/alertmanager/multitenant_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,10 @@ receivers:
270270
`
271271

272272
// Create the Multitenant Alertmanager.
273-
reg := prometheus.NewPedanticRegistry()
274273
am := createMultitenantAlertmanager(&MultitenantAlertmanagerConfig{
275274
ExternalURL: externalURL,
276275
DataDir: tempDir,
277-
}, nil, nil, mockStore, log.NewNopLogger(), reg)
276+
}, nil, nil, mockStore, log.NewNopLogger(), nil)
278277
am.fallbackConfig = fallbackCfg
279278

280279
// Request when no user configuration is present.

0 commit comments

Comments
 (0)