1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

chore: GA (remove flag) for Slack App integration (#4765)

https://linear.app/unleash/issue/2-1405/remove-slackappaddon-feature-flag-and-make-this-ga

GA's the new Slack App integration by removing the feature flag 🚀
This commit is contained in:
Nuno Góis 2023-09-21 13:55:58 +01:00 committed by GitHub
parent 6884f9cdc9
commit ea9901c968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 33 deletions

View File

@ -103,7 +103,6 @@ exports[`should create default config 1`] = `
"privateProjects": false,
"proPlanAutoCharge": false,
"responseTimeWithAppNameKillSwitch": false,
"slackAppAddon": false,
"strictSchemaValidation": false,
"variantTypeNumber": false,
},
@ -142,7 +141,6 @@ exports[`should create default config 1`] = `
"privateProjects": false,
"proPlanAutoCharge": false,
"responseTimeWithAppNameKillSwitch": false,
"slackAppAddon": false,
"strictSchemaValidation": false,
"variantTypeNumber": false,
},

View File

@ -9,7 +9,7 @@ export const addonDefinitionSchema = joi.object().keys({
documentationUrl: joi.string().uri({ scheme: [/https?/] }),
description: joi.string().allow(''),
howTo: joi.string().optional().allow(''),
deprecated: joi.boolean().optional().default(false),
deprecated: joi.string().optional().allow(''),
parameters: joi
.array()
.optional()

View File

@ -5,7 +5,6 @@ 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;
@ -14,28 +13,15 @@ export interface IAddonProviders {
export const getAddons: (args: {
getLogger: LogProvider;
unleashUrl: string;
flagResolver: IFlagResolver;
}) => IAddonProviders = ({ getLogger, unleashUrl, flagResolver }) => {
const slackAppAddonEnabled = flagResolver.isEnabled('slackAppAddon');
const slackAddon = new SlackAddon({ getLogger, unleashUrl });
if (slackAppAddonEnabled) {
slackAddon.definition.deprecated =
'This integration is deprecated. Please try the new Slack App integration instead.';
}
}) => IAddonProviders = ({ getLogger, unleashUrl }) => {
const addons: Addon[] = [
new Webhook({ getLogger }),
slackAddon,
new SlackAddon({ getLogger, unleashUrl }),
new SlackAppAddon({ getLogger, unleashUrl }),
new TeamsAddon({ getLogger, unleashUrl }),
new DatadogAddon({ getLogger, unleashUrl, flagResolver }),
];
if (slackAppAddonEnabled) {
addons.push(new SlackAppAddon({ getLogger, unleashUrl }));
}
return addons.reduce((map, addon) => {
// eslint-disable-next-line no-param-reassign
map[addon.name] = addon;

View File

@ -22,6 +22,8 @@ const slackDefinition: IAddonDefinition = {
displayName: 'Slack',
description: 'Allows Unleash to post updates to Slack.',
documentationUrl: 'https://docs.getunleash.io/docs/addons/slack',
deprecated:
'This integration is deprecated. Please try the new Slack App integration instead.',
alerts: [
{
type: 'warning',

View File

@ -49,11 +49,7 @@ export default class AddonService {
IUnleashStores,
'addonStore' | 'eventStore' | 'featureToggleStore'
>,
{
getLogger,
server,
flagResolver,
}: Pick<IUnleashConfig, 'getLogger' | 'server' | 'flagResolver'>,
{ getLogger, server }: Pick<IUnleashConfig, 'getLogger' | 'server'>,
tagTypeService: TagTypeService,
addons?: IAddonProviders,
) {
@ -68,7 +64,6 @@ export default class AddonService {
getAddons({
getLogger,
unleashUrl: server.unleashUrl,
flagResolver,
});
this.sensitiveParams = this.loadSensitiveParams(this.addonProviders);
if (addonStore) {

View File

@ -20,7 +20,6 @@ export type IFlagKey =
| 'disableBulkToggle'
| 'disableNotifications'
| 'advancedPlayground'
| 'slackAppAddon'
| 'filterInvalidClientMetrics'
| 'lastSeenByEnvironment'
| 'customRootRolesKillSwitch'
@ -99,10 +98,6 @@ const flags: IFlags = {
process.env.DISABLE_NOTIFICATIONS,
false,
),
slackAppAddon: parseEnvVarBoolean(
process.env.UNLEASH_SLACK_APP_ADDON,
false,
),
filterInvalidClientMetrics: parseEnvVarBoolean(
process.env.FILTER_INVALID_CLIENT_METRICS,
false,

View File

@ -37,7 +37,6 @@ process.nextTick(async () => {
embedProxyFrontend: true,
anonymiseEventLog: false,
responseTimeWithAppNameKillSwitch: false,
slackAppAddon: true,
lastSeenByEnvironment: true,
featureNamingPattern: true,
doraMetrics: true,

View File

@ -13,7 +13,6 @@ beforeAll(async () => {
experimental: {
flags: {
strictSchemaValidation: true,
slackAppAddon: true,
},
},
});