prom-wrapper: fix conf usage (#33398)

Due to changes related to #29222, it looks like prom-wrapper is no longer using conf correctly and requires a call to conf.Init. This caused all alerting to break for all sourcegraph instances as of 3.38 (see #33394)
This commit is contained in:
Robert Lin 2022-04-04 18:31:23 -07:00 committed by GitHub
parent 6edfb5d4db
commit 8d884dbf87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,11 @@ func (c *SiteConfigSubscriber) Handler() http.Handler {
}
func (c *SiteConfigSubscriber) Subscribe(ctx context.Context) {
// Initialize conf package
conf.Init()
// Load initial alerts configuration
c.log.Debug("making initial site config load")
siteConfig := newSubscribedSiteConfig(conf.Get().SiteConfiguration)
diffs := siteConfig.Diff(c.config)
if len(diffs) > 0 {