1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00

chore: hide/disallow new instances of deprecated integrations (#10104)

This commit is contained in:
David Leek 2025-06-10 12:19:37 +02:00 committed by GitHub
parent 45d48d12a9
commit ffe40cab59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -56,6 +56,7 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
}) => {
const { isEnterprise } = useUiConfig();
const signalsEnabled = useUiFlag('signals');
const filtered = providers?.filter((provider) => !provider.deprecated);
const customProviders = [JIRA_INFO];
const serverSdks = OFFICIAL_SDKS.filter((sdk) => sdk.type === 'server');
@ -74,7 +75,7 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
</Typography>
</div>
<StyledCardsGrid>
{providers
{filtered
?.sort(
(a, b) =>
a.displayName?.localeCompare(b.displayName) ||

View File

@ -70,6 +70,7 @@ export const ConfiguredIntegrations: VFC<ConfiguredIntegrationsProps> = ({
description={description || ''}
link={`/integrations/edit/${id}`}
configureActionText='Open'
deprecated={providerConfig?.deprecated}
/>
);
})}

View File

@ -28,7 +28,7 @@ import type { IAddonDefinition } from '../types/model.js';
import { minutesToMilliseconds } from 'date-fns';
import type EventService from '../features/events/event-service.js';
import { omitKeys } from '../util/index.js';
import { NotFoundError } from '../error/index.js';
import { BadDataError, NotFoundError } from '../error/index.js';
import type { IntegrationEventsService } from '../features/integration-events/integration-events-service.js';
import type { IEvent } from '../events/index.js';
@ -224,6 +224,10 @@ export default class AddonService {
const addonConfig = await addonSchema.validateAsync(data);
await this.validateKnownProvider(addonConfig);
await this.validateRequiredParameters(addonConfig);
const addon = this.addonProviders[addonConfig.provider];
if (addon.definition.deprecated) {
throw new BadDataError(addon.definition.deprecated);
}
const createdAddon = await this.addonStore.insert(addonConfig);
await this.addTagTypes(createdAddon.provider);