Fix: admin config set API for notifications (#9085)

Filter out targets set via env when
validating incoming config change against
configured notification targets

Fixes #9066
This commit is contained in:
poornas
2020-03-14 00:01:15 -07:00
committed by GitHub
parent 3fea1d5e35
commit 10fd53d6bb
3 changed files with 17 additions and 4 deletions

View File

@@ -428,6 +428,10 @@ func lookupConfigs(s config.Config) {
if err != nil {
logger.LogIf(ctx, fmt.Errorf("Unable to initialize notification target(s): %w", err))
}
globalEnvTargetList, err = notify.GetNotificationTargets(newServerConfig(), GlobalServiceDoneCh, NewCustomHTTPTransport())
if err != nil {
logger.LogIf(ctx, fmt.Errorf("Unable to initialize notification target(s): %w", err))
}
}
// Help - return sub-system level help