mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: datadog addon needs flagResolver (#4806)
Fixes what this breaks: https://github.com/Unleash/unleash/pull/4765 - The Datadog integration needs a `flagResolver`.
This commit is contained in:
parent
ea9901c968
commit
7eae1f8382
@ -5,6 +5,7 @@ import DatadogAddon from './datadog';
|
||||
import Addon from './addon';
|
||||
import { LogProvider } from '../logger';
|
||||
import SlackAppAddon from './slack-app';
|
||||
import { IFlagResolver } from '../types';
|
||||
|
||||
export interface IAddonProviders {
|
||||
[key: string]: Addon;
|
||||
@ -13,7 +14,8 @@ export interface IAddonProviders {
|
||||
export const getAddons: (args: {
|
||||
getLogger: LogProvider;
|
||||
unleashUrl: string;
|
||||
}) => IAddonProviders = ({ getLogger, unleashUrl }) => {
|
||||
flagResolver: IFlagResolver;
|
||||
}) => IAddonProviders = ({ getLogger, unleashUrl, flagResolver }) => {
|
||||
const addons: Addon[] = [
|
||||
new Webhook({ getLogger }),
|
||||
new SlackAddon({ getLogger, unleashUrl }),
|
||||
|
@ -49,7 +49,11 @@ export default class AddonService {
|
||||
IUnleashStores,
|
||||
'addonStore' | 'eventStore' | 'featureToggleStore'
|
||||
>,
|
||||
{ getLogger, server }: Pick<IUnleashConfig, 'getLogger' | 'server'>,
|
||||
{
|
||||
getLogger,
|
||||
server,
|
||||
flagResolver,
|
||||
}: Pick<IUnleashConfig, 'getLogger' | 'server' | 'flagResolver'>,
|
||||
tagTypeService: TagTypeService,
|
||||
addons?: IAddonProviders,
|
||||
) {
|
||||
@ -64,6 +68,7 @@ export default class AddonService {
|
||||
getAddons({
|
||||
getLogger,
|
||||
unleashUrl: server.unleashUrl,
|
||||
flagResolver,
|
||||
});
|
||||
this.sensitiveParams = this.loadSensitiveParams(this.addonProviders);
|
||||
if (addonStore) {
|
||||
|
Loading…
Reference in New Issue
Block a user