Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: release feature flag for proxy support COMPASS-8167 #6157

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading