diff --git a/frontend/src/component/integrations/IntegrationForm/IntegrationForm.tsx b/frontend/src/component/integrations/IntegrationForm/IntegrationForm.tsx index 65ec5f1239..979db6bf32 100644 --- a/frontend/src/component/integrations/IntegrationForm/IntegrationForm.tsx +++ b/frontend/src/component/integrations/IntegrationForm/IntegrationForm.tsx @@ -52,7 +52,6 @@ import { IntegrationDelete } from './IntegrationDelete/IntegrationDelete'; import { IntegrationStateSwitch } from './IntegrationStateSwitch/IntegrationStateSwitch'; import { capitalizeFirst } from 'utils/capitalizeFirst'; import { IntegrationHowToSection } from '../IntegrationHowToSection/IntegrationHowToSection'; -import { useUiFlag } from 'hooks/useUiFlag'; import { IntegrationEventsModal } from '../IntegrationEvents/IntegrationEventsModal'; import AccessContext from 'contexts/AccessContext'; @@ -116,7 +115,6 @@ export const IntegrationForm: VFC = ({ }); const [eventsModalOpen, setEventsModalOpen] = useState(false); const { isAdmin } = useContext(AccessContext); - const integrationEventsEnabled = useUiFlag('integrationEvents'); const submitText = editMode ? 'Update' : 'Create'; const url = `${uiConfig.unleashUrl}/api/admin/addons${ @@ -318,7 +316,7 @@ export const IntegrationForm: VFC = ({ integration setEventsModalOpen(true)}> View events diff --git a/frontend/src/component/integrations/IntegrationList/IntegrationCard/IntegrationCardMenu/IntegrationCardMenu.tsx b/frontend/src/component/integrations/IntegrationList/IntegrationCard/IntegrationCardMenu/IntegrationCardMenu.tsx index 6cdcecc1a0..715fd38f7b 100644 --- a/frontend/src/component/integrations/IntegrationList/IntegrationCard/IntegrationCardMenu/IntegrationCardMenu.tsx +++ b/frontend/src/component/integrations/IntegrationList/IntegrationCard/IntegrationCardMenu/IntegrationCardMenu.tsx @@ -25,8 +25,6 @@ import useAddons from 'hooks/api/getters/useAddons/useAddons'; import useToast from 'hooks/useToast'; import { formatUnknownError } from 'utils/formatUnknownError'; import { Dialogue } from 'component/common/Dialogue/Dialogue'; -import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; -import { useUiFlag } from 'hooks/useUiFlag'; import Visibility from '@mui/icons-material/Visibility'; import { PermissionHOC } from 'component/common/PermissionHOC/PermissionHOC'; import { IntegrationEventsModal } from 'component/integrations/IntegrationEvents/IntegrationEventsModal'; @@ -55,7 +53,6 @@ export const IntegrationCardMenu: VFC = ({ const { refetchAddons } = useAddons(); const { setToastData, setToastApiError } = useToast(); const [eventsModalOpen, setEventsModalOpen] = useState(false); - const integrationEventsEnabled = useUiFlag('integrationEvents'); const closeMenu = () => { setIsMenuOpen(false); @@ -131,24 +128,19 @@ export const IntegrationCardMenu: VFC = ({ }} onClose={handleMenuClick} > - - {({ hasAccess }) => ( - setEventsModalOpen(true)} - disabled={!hasAccess} - > - - - - View events - - )} - - } - /> + + {({ hasAccess }) => ( + setEventsModalOpen(true)} + disabled={!hasAccess} + > + + + + View events + + )} + { setIsToggleOpen(true); diff --git a/frontend/src/hooks/api/getters/useIntegrationEvents/useIntegrationEvents.ts b/frontend/src/hooks/api/getters/useIntegrationEvents/useIntegrationEvents.ts index 95176e4ce2..f10b588336 100644 --- a/frontend/src/hooks/api/getters/useIntegrationEvents/useIntegrationEvents.ts +++ b/frontend/src/hooks/api/getters/useIntegrationEvents/useIntegrationEvents.ts @@ -5,7 +5,6 @@ import useSWRInfinite, { } from 'swr/infinite'; import { formatApiPath } from 'utils/formatPath'; import type { IntegrationEvents } from 'interfaces/integrationEvent'; -import { useUiFlag } from 'hooks/useUiFlag'; import AccessContext from 'contexts/AccessContext'; import handleErrorResponses from '../httpErrorResponseHandler'; @@ -21,15 +20,13 @@ export const useIntegrationEvents = ( options: SWRInfiniteConfiguration = {}, ) => { const { isAdmin } = useContext(AccessContext); - const integrationEventsEnabled = useUiFlag('integrationEvents'); const getKey: SWRInfiniteKeyLoader = ( pageIndex: number, previousPageData: IntegrationEvents, ) => { // Does not meet conditions - if (!integrationId || !isAdmin || !integrationEventsEnabled) - return null; + if (!integrationId || !isAdmin) return null; // Reached the end if (previousPageData && !previousPageData.integrationEvents.length) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index f8e114dc1a..85a6e0994c 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -89,7 +89,6 @@ export type UiFlags = { navigationSidebar?: boolean; flagCreator?: boolean; resourceLimits?: boolean; - integrationEvents?: boolean; newEventSearch?: boolean; archiveProjects?: boolean; projectListImprovements?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index b09129ae10..11585572f2 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -120,7 +120,6 @@ exports[`should create default config 1`] = ` }, "filterInvalidClientMetrics": false, "googleAuthEnabled": false, - "integrationEvents": false, "killInsightsUI": false, "killScheduledChangeRequestCache": false, "maintenanceMode": false, diff --git a/src/lib/addons/addon.ts b/src/lib/addons/addon.ts index 6ba3dc7405..9cec97f189 100644 --- a/src/lib/addons/addon.ts +++ b/src/lib/addons/addon.ts @@ -92,9 +92,7 @@ export default abstract class Addon { async registerEvent( integrationEvent: IntegrationEventWriteModel, ): Promise { - if (this.flagResolver.isEnabled('integrationEvents')) { - await this.integrationEventsService.registerEvent(integrationEvent); - } + await this.integrationEventsService.registerEvent(integrationEvent); } destroy?(): void; diff --git a/src/lib/features/integration-events/integration-events-service.ts b/src/lib/features/integration-events/integration-events-service.ts index d41630ffb7..bbfaf6b260 100644 --- a/src/lib/features/integration-events/integration-events-service.ts +++ b/src/lib/features/integration-events/integration-events-service.ts @@ -44,8 +44,6 @@ export class IntegrationEventsService { } async cleanUpEvents(): Promise { - if (!this.flagResolver.isEnabled('integrationEvents')) return; - await this.integrationEventsStore.cleanUpEvents(); } } diff --git a/src/lib/features/integration-events/integration-events.e2e.test.ts b/src/lib/features/integration-events/integration-events.e2e.test.ts index cd1b26f218..0c2476d946 100644 --- a/src/lib/features/integration-events/integration-events.e2e.test.ts +++ b/src/lib/features/integration-events/integration-events.e2e.test.ts @@ -51,9 +51,7 @@ beforeAll(async () => { db.stores, { experimental: { - flags: { - integrationEvents: true, - }, + flags: {}, }, }, db.rawDatabase, diff --git a/src/lib/routes/admin-api/addon.ts b/src/lib/routes/admin-api/addon.ts index ae10aaf0e6..c65112f7c9 100644 --- a/src/lib/routes/admin-api/addon.ts +++ b/src/lib/routes/admin-api/addon.ts @@ -38,7 +38,7 @@ import { type IntegrationEventsSchema, integrationEventsSchema, } from '../../openapi/spec/integration-events-schema'; -import { BadDataError, NotFoundError } from '../../error'; +import { BadDataError } from '../../error'; import type { IntegrationEventsService } from '../../services'; type AddonServices = Pick< @@ -276,10 +276,6 @@ Note: passing \`null\` as a value for the description property will set it to an >, res: Response, ): Promise { - if (!this.flagResolver.isEnabled('integrationEvents')) { - throw new NotFoundError('This feature is not enabled'); - } - const { id } = req.params; if (Number.isNaN(Number(id))) { diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 6312a2b566..b2a515e5f2 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -59,7 +59,6 @@ export type IFlagKey = | 'resourceLimits' | 'extendedMetrics' | 'removeUnsafeInlineStyleSrc' - | 'integrationEvents' | 'originMiddleware' | 'newEventSearch' | 'archiveProjects' @@ -292,10 +291,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_REMOVE_UNSAFE_INLINE_STYLE_SRC, false, ), - integrationEvents: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS, - false, - ), originMiddleware: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_ORIGIN_MIDDLEWARE, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index 1d8860a96e..0d9807b148 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -52,7 +52,6 @@ process.nextTick(async () => { enableLegacyVariants: false, resourceLimits: true, extendedMetrics: true, - integrationEvents: true, originMiddleware: true, newEventSearch: true, projectListImprovements: true,