From e724cd536cb5571d064ec811dfbdfa6e325b95e4 Mon Sep 17 00:00:00 2001 From: Zach Waterfield Date: Mon, 18 Mar 2024 17:30:55 -0400 Subject: [PATCH] Add feature flag for reverse proxy on feature flag onboarding --- frontend/src/lib/constants.tsx | 1 + frontend/src/scenes/onboarding/onboardingLogic.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 77d5f9c37eb0f..833dfee10502b 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -209,6 +209,7 @@ export const FEATURE_FLAGS = { REPLAY_ERROR_CLUSTERING: 'session-replay-error-clustering', // owner: #team-replay AUDIT_LOGS_ACCESS: 'audit-logs-access', // owner: #team-growth SUBSCRIBE_FROM_PAYGATE: 'subscribe-from-paygate', // owner: #team-growth + REVERSE_PROXY_ONBOARDING: 'reverse-proxy-onboarding', // owner: @zlwaterfield } as const export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS] diff --git a/frontend/src/scenes/onboarding/onboardingLogic.tsx b/frontend/src/scenes/onboarding/onboardingLogic.tsx index 8c7b396cc4b3b..88f9d4615c45e 100644 --- a/frontend/src/scenes/onboarding/onboardingLogic.tsx +++ b/frontend/src/scenes/onboarding/onboardingLogic.tsx @@ -214,9 +214,12 @@ export const onboardingLogic = kea([ }, ], shouldShowReverseProxyStep: [ - (s) => [s.product], - (product: BillingProductV2Type | null) => { - const productsWithReverseProxy = [ProductKey.FEATURE_FLAGS] + (s) => [s.product, s.featureFlags], + (product: BillingProductV2Type | null, featureFlags: FeatureFlagsSet) => { + const productsWithReverseProxy = [] + if (featureFlags[FEATURE_FLAGS.REVERSE_PROXY_ONBOARDING] === 'test') { + productsWithReverseProxy.push(ProductKey.FEATURE_FLAGS) + } return productsWithReverseProxy.includes(product?.type as ProductKey) }, ],