Skip to content

Commit

Permalink
feat: release feature flag for proxy support COMPASS-8167 (#6157)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Aug 27, 2024
1 parent 63c3e19 commit 4eaf037
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export function useConnectionFormPreferences() {
const protectConnectionStringsForNewConnections = usePreference(
'protectConnectionStringsForNewConnections'
);
const showProxySettings = usePreference('enableProxySupport');

return useMemo(
() => ({
Expand All @@ -24,7 +23,6 @@ export function useConnectionFormPreferences() {
enableOidc,
enableDebugUseCsfleSchemaMap,
protectConnectionStringsForNewConnections,
showProxySettings,
}),
[
protectConnectionStrings,
Expand All @@ -34,7 +32,6 @@ export function useConnectionFormPreferences() {
enableOidc,
enableDebugUseCsfleSchemaMap,
protectConnectionStringsForNewConnections,
showProxySettings,
]
);
}
1 change: 0 additions & 1 deletion packages/compass-e2e-tests/tests/oidc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion packages/compass-e2e-tests/tests/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down
2 changes: 1 addition & 1 deletion packages/compass-preferences-model/src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
16 changes: 5 additions & 11 deletions packages/compass-settings/src/components/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type SettingsModalProps = {
isAIFeatureEnabled: boolean;
isOpen: boolean;
isOIDCEnabled: boolean;
isProxySupportEnabled: boolean;
selectedTab: SettingsTabId | undefined;
onMount?: () => void;
onClose: () => void;
Expand Down Expand Up @@ -65,7 +64,6 @@ const settingsStyles = css(

export const SettingsModal: React.FunctionComponent<SettingsModalProps> = ({
isAIFeatureEnabled,
isProxySupportEnabled,
isOpen,
selectedTab,
onMount,
Expand All @@ -86,6 +84,11 @@ export const SettingsModal: React.FunctionComponent<SettingsModalProps> = ({
{ 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 (
Expand All @@ -108,14 +111,6 @@ export const SettingsModal: React.FunctionComponent<SettingsModalProps> = ({
});
}

if (isProxySupportEnabled) {
settings.push({
tabId: 'proxy',
name: 'Proxy Configuration',
component: ProxySettings,
});
}

if (useShouldShowFeaturePreviewSettings()) {
settings.push({
tabId: 'preview',
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 4eaf037

Please sign in to comment.