diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index c00a70a7cab6..a9c3fe523fe3 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -50,7 +50,6 @@ export type UiFlags = { UNLEASH_CLOUD?: boolean; UG?: boolean; embedProxyFrontend?: boolean; - maintenanceMode?: boolean; messageBanner?: Variant; banner?: Variant; featuresExportImport?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index d5f1617b9b68..a2b1f67c8a7f 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -124,7 +124,6 @@ exports[`should create default config 1`] = ` "integrationEvents": false, "killInsightsUI": false, "killScheduledChangeRequestCache": false, - "maintenanceMode": false, "manyStrategiesPagination": false, "messageBanner": { "enabled": false, diff --git a/src/lib/features/maintenance/maintenance-service.ts b/src/lib/features/maintenance/maintenance-service.ts index 7339f86f6e72..5138090e5186 100644 --- a/src/lib/features/maintenance/maintenance-service.ts +++ b/src/lib/features/maintenance/maintenance-service.ts @@ -34,10 +34,7 @@ export default class MaintenanceService implements IMaintenanceStatus { async isMaintenanceMode(): Promise { try { - return ( - this.config.flagResolver.isEnabled('maintenanceMode') || - (await this.resolveMaintenance()) - ); + return await this.resolveMaintenance(); } catch (e) { this.logger.warn('Error checking maintenance mode', e); return false; diff --git a/src/lib/openapi/spec/ui-config-schema.ts b/src/lib/openapi/spec/ui-config-schema.ts index c8f18b0dd2a0..c436c73c5148 100644 --- a/src/lib/openapi/spec/ui-config-schema.ts +++ b/src/lib/openapi/spec/ui-config-schema.ts @@ -61,11 +61,6 @@ export const uiConfigSchema = { description: 'Whether this instance can send out emails or not.', example: true, }, - maintenanceMode: { - type: 'boolean', - description: 'Whether maintenance mode is currently active or not.', - example: false, - }, segmentValuesLimit: { type: 'number', description: diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index e6df34fecd5a..f5ffa07c342c 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -11,7 +11,6 @@ export type IFlagKey = | 'embedProxy' | 'embedProxyFrontend' | 'responseTimeWithAppNameKillSwitch' - | 'maintenanceMode' | 'messageBanner' | 'featuresExportImport' | 'caseInsensitiveInOperators' @@ -87,10 +86,6 @@ const flags: IFlags = { process.env.UNLEASH_RESPONSE_TIME_WITH_APP_NAME_KILL_SWITCH, false, ), - maintenanceMode: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_MAINTENANCE_MODE, - false, - ), messageBanner: { name: 'message-banner', enabled: parseEnvVarBoolean( diff --git a/src/test/e2e/api/admin/maintenance.e2e.test.ts b/src/test/e2e/api/admin/maintenance.e2e.test.ts index 9e199e45be4e..5cf9c44d7246 100644 --- a/src/test/e2e/api/admin/maintenance.e2e.test.ts +++ b/src/test/e2e/api/admin/maintenance.e2e.test.ts @@ -19,9 +19,7 @@ afterAll(async () => { test('should not allow to create feature flags in maintenance mode', async () => { const appWithMaintenanceMode = await setupAppWithCustomConfig(db.stores, { experimental: { - flags: { - maintenanceMode: true, - }, + flags: {}, }, }); @@ -68,9 +66,7 @@ test('should go into maintenance mode, when user has set it', async () => { test('maintenance mode flag should take precedence over maintenance mode setting', async () => { const appWithMaintenanceMode = await setupAppWithCustomConfig(db.stores, { experimental: { - flags: { - maintenanceMode: true, - }, + flags: {}, }, });