From 23c26b1f2a692d8689d19492a487b026dd218380 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 27 Aug 2024 16:56:28 +0200 Subject: [PATCH] feat: release feature flag for proxy support COMPASS-8167 --- .../hooks/use-connection-form-preferences.tsx | 3 --- packages/compass-e2e-tests/tests/oidc.test.ts | 1 - packages/compass-e2e-tests/tests/proxy.test.ts | 1 - .../src/feature-flags.ts | 2 +- .../compass-settings/src/components/modal.tsx | 16 +++++----------- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/packages/compass-connections/src/hooks/use-connection-form-preferences.tsx b/packages/compass-connections/src/hooks/use-connection-form-preferences.tsx index 609ddc75339..72b56bea79c 100644 --- a/packages/compass-connections/src/hooks/use-connection-form-preferences.tsx +++ b/packages/compass-connections/src/hooks/use-connection-form-preferences.tsx @@ -13,7 +13,6 @@ export function useConnectionFormPreferences() { const protectConnectionStringsForNewConnections = usePreference( 'protectConnectionStringsForNewConnections' ); - const showProxySettings = usePreference('enableProxySupport'); return useMemo( () => ({ @@ -24,7 +23,6 @@ export function useConnectionFormPreferences() { enableOidc, enableDebugUseCsfleSchemaMap, protectConnectionStringsForNewConnections, - showProxySettings, }), [ protectConnectionStrings, @@ -34,7 +32,6 @@ export function useConnectionFormPreferences() { enableOidc, enableDebugUseCsfleSchemaMap, protectConnectionStringsForNewConnections, - showProxySettings, ] ); } diff --git a/packages/compass-e2e-tests/tests/oidc.test.ts b/packages/compass-e2e-tests/tests/oidc.test.ts index eb377b0a576..e4bfb8251dc 100644 --- a/packages/compass-e2e-tests/tests/oidc.test.ts +++ b/packages/compass-e2e-tests/tests/oidc.test.ts @@ -495,7 +495,6 @@ describe('OIDC integration', function () { beforeEach(async function () { await browser.setFeature('proxy', ''); - await browser.setFeature('enableProxySupport', true); httpServer = createHTTPServer(); ({ connectRequests, httpForwardRequests, connections } = setupProxyServer(httpServer)); diff --git a/packages/compass-e2e-tests/tests/proxy.test.ts b/packages/compass-e2e-tests/tests/proxy.test.ts index 90fc7f0fe42..059e678cf9d 100644 --- a/packages/compass-e2e-tests/tests/proxy.test.ts +++ b/packages/compass-e2e-tests/tests/proxy.test.ts @@ -95,7 +95,6 @@ describe('Proxy support', function () { browser = compass.browser; await browser.setFeature('proxy', ''); - await browser.setFeature('enableProxySupport', true); httpProxyServer1.removeAllListeners('request'); ({ connectRequests, connections } = setupProxyServer(httpProxyServer1)); }); diff --git a/packages/compass-preferences-model/src/feature-flags.ts b/packages/compass-preferences-model/src/feature-flags.ts index 12542101c8a..58a2774d09b 100644 --- a/packages/compass-preferences-model/src/feature-flags.ts +++ b/packages/compass-preferences-model/src/feature-flags.ts @@ -78,7 +78,7 @@ export const featureFlags: Required<{ * Feature flag for explicit proxy configuration support. */ enableProxySupport: { - stage: 'development', + stage: 'released', description: { short: 'Enables support for explicit proxy configuration.', long: 'Allows users to specify proxy configuration for the entire Compass application.', diff --git a/packages/compass-settings/src/components/modal.tsx b/packages/compass-settings/src/components/modal.tsx index 38e7723b044..3879123dd96 100644 --- a/packages/compass-settings/src/components/modal.tsx +++ b/packages/compass-settings/src/components/modal.tsx @@ -34,7 +34,6 @@ type SettingsModalProps = { isAIFeatureEnabled: boolean; isOpen: boolean; isOIDCEnabled: boolean; - isProxySupportEnabled: boolean; selectedTab: SettingsTabId | undefined; onMount?: () => void; onClose: () => void; @@ -65,7 +64,6 @@ const settingsStyles = css( export const SettingsModal: React.FunctionComponent = ({ isAIFeatureEnabled, - isProxySupportEnabled, isOpen, selectedTab, onMount, @@ -86,6 +84,11 @@ export const SettingsModal: React.FunctionComponent = ({ { tabId: 'general', name: 'General', component: GeneralSettings }, { tabId: 'theme', name: 'Theme', component: ThemeSettings }, { tabId: 'privacy', name: 'Privacy', component: PrivacySettings }, + { + tabId: 'proxy', + name: 'Proxy Configuration', + component: ProxySettings, + }, ]; if ( @@ -108,14 +111,6 @@ export const SettingsModal: React.FunctionComponent = ({ }); } - if (isProxySupportEnabled) { - settings.push({ - tabId: 'proxy', - name: 'Proxy Configuration', - component: ProxySettings, - }); - } - if (useShouldShowFeaturePreviewSettings()) { settings.push({ tabId: 'preview', @@ -170,7 +165,6 @@ export default connect( state.settings.isModalOpen && state.settings.loadingState === 'ready', isAIFeatureEnabled: !!state.settings.settings.enableGenAIFeatures, isOIDCEnabled: !!state.settings.settings.enableOidc, - isProxySupportEnabled: !!state.settings.settings.enableProxySupport, hasChangedSettings: state.settings.updatedFields.length > 0, selectedTab: state.settings.tab, };