Skip to content

Commit

Permalink
Add feature flag for reverse proxy on feature flag onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Mar 18, 2024
1 parent 750031e commit e724cd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
9 changes: 6 additions & 3 deletions frontend/src/scenes/onboarding/onboardingLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ export const onboardingLogic = kea<onboardingLogicType>([
},
],
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)
},
],
Expand Down

0 comments on commit e724cd5

Please sign in to comment.