:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(insights): remove the retention-dwh feature flag gate (#87040)
Thomas Obermüller59077e5fa2db
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex dd8af25a9b85..6605f7f55363 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -441,7 +441,6 @@ export const FEATURE_FLAGS = {PRODUCT_ANALYTICS_PATHS_V2: 'paths-v2', // owner: @thmsobrmlr #team-product-analyticsPRODUCT_ANALYTICS_QUARTER_YEAR_INTERVALS: 'product-analytics-quarter-year-intervals', // owner: @sampennington #team-product-analytics, gates quarter/year interval selection on insightsPRODUCT_ANALYTICS_RETENTION_AGGREGATION: 'retention-aggregation', // owner: @anirudhpillai #team-product-analytics- PRODUCT_ANALYTICS_RETENTION_DWH: 'retention-dwh', // owner: @thmsobrmlr #team-product-analyticsPRODUCT_AUTONOMY: 'product-autonomy', // owner: #team-self-drivingPRODUCT_BUSINESS_KNOWLEDGE: 'product-business-knowledge', // owner: @veryayskiy #team-conversationsPRODUCT_DATA_CATALOG: 'product-data-catalog', // owner: #team-data-modeling, gates the semantic layer (governed-metrics catalog and its agent prompt steering)diff --git a/frontend/src/scenes/insights/EditorFilters/RetentionCondition.tsx b/frontend/src/scenes/insights/EditorFilters/RetentionCondition.tsxindex a5cb34276a53..a73afb01e638 100644--- a/frontend/src/scenes/insights/EditorFilters/RetentionCondition.tsx+++ b/frontend/src/scenes/insights/EditorFilters/RetentionCondition.tsx@@ -32,6 +32,12 @@ const retentionDataWarehousePopoverFields: DataWarehousePopoverField[] = [{ key: 'aggregation_target_field', label: 'Aggregation target', allowHogQL: true },]+const actionsTaxonomicGroupTypes = [+ TaxonomicFilterGroupType.Events,+ TaxonomicFilterGroupType.Actions,+ TaxonomicFilterGroupType.DataWarehouse,+]+function retentionEntityToFilter(entity: Record<string, any> | undefined): FilterType {if (!entity) {return {}@@ -160,15 +166,11 @@ function CustomBrackets({ insightProps }: { insightProps: EditorFilterProps['insexport function RetentionCondition({ insightProps }: EditorFilterProps): JSX.Element {const { showGroupsOptions } = useValues(groupsModel)- const { retentionFilter, dateRange, isRetentionDWHEnabled } = useValues(retentionLogic(insightProps))+ const { retentionFilter, dateRange } = useValues(retentionLogic(insightProps))const { updateInsightFilter, updateDateRange } = useActions(retentionLogic(insightProps))const { targetEntity, returningEntity, retentionType, totalIntervals, period, retentionCustomBrackets } =retentionFilter || {}- const actionsTaxonomicGroupTypes = isRetentionDWHEnabled- ? [TaxonomicFilterGroupType.Events, TaxonomicFilterGroupType.Actions, TaxonomicFilterGroupType.DataWarehouse]- : [TaxonomicFilterGroupType.Events, TaxonomicFilterGroupType.Actions]-return (<div className="deprecated-space-y-3 mb-4" data-attr="retention-condition"><div className="flex items-center">diff --git a/frontend/src/scenes/insights/filters/AggregationSelect.tsx b/frontend/src/scenes/insights/filters/AggregationSelect.tsxindex 526272cd5bbb..4490e8f1e9cb 100644--- a/frontend/src/scenes/insights/filters/AggregationSelect.tsx+++ b/frontend/src/scenes/insights/filters/AggregationSelect.tsx@@ -3,9 +3,7 @@ import { useActions, useValues } from 'kea'import { LemonSelect, LemonSelectSection } from '@posthog/lemon-ui'import { HogQLEditor } from 'lib/components/HogQLEditor/HogQLEditor'-import { FEATURE_FLAGS } from 'lib/constants'import { groupsAccessLogic } from 'lib/introductions/groupsAccessLogic'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { GroupIntroductionFooter } from 'scenes/groups/GroupsIntroduction'import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'@@ -64,14 +62,11 @@ export function AggregationSelect({const { groupTypes, aggregationLabel } = useValues(groupsModel)const { needsUpgradeForGroups, canStartUsingGroups } = useValues(groupsAccessLogic)- const { featureFlags } = useValues(featureFlagLogic)if (!isInsightQueryNode(querySource)) {return null}- const isRetentionDWHEnabled = !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_RETENTION_DWH]-const value =(isLifecycleQuery(querySource) && querySource.customAggregationTarget) ||(isFunnelsQuery(querySource) && querySource.funnelsFilter?.customAggregationTarget) ||@@ -172,7 +167,7 @@ export function AggregationSelect({})}- if (isFunnels || isLifecycle || (isRetention && isRetentionDWHEnabled)) {+ if (isFunnels || isLifecycle || isRetention) {const hasOnlyDataWarehouseRetentionEntities =isRetentionQuery(querySource) &&querySource.retentionFilter &&diff --git a/frontend/src/scenes/retention/retentionLogic.ts b/frontend/src/scenes/retention/retentionLogic.tsindex 79eb81257e64..9ebde0779d8b 100644--- a/frontend/src/scenes/retention/retentionLogic.ts+++ b/frontend/src/scenes/retention/retentionLogic.ts@@ -3,9 +3,7 @@ import { MakeLogicType, actions, connect, events, kea, key, listeners, path, proimport { DataColorTheme, DataColorToken } from 'lib/colors'import { CUSTOM_OPTION_KEY } from 'lib/components/DateFilter/types'-import { FEATURE_FLAGS } from 'lib/constants'import { dayjs } from 'lib/dayjs'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { formatDateRange } from 'lib/utils/datetime'import {BreakdownColorConfig,@@ -26,7 +24,6 @@ import { RetentionFilter, RetentionResult } from '~/queries/schema/schema-generaimport { isRetentionQuery, hasBreakdownFilter } from '~/queries/utils'import { BreakdownKeyType, CohortType, DateMappingOption, InsightLogicProps, RetentionPeriod } from '~/types'-import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'import type {BreakdownFilter,DataNode,@@ -65,7 +62,6 @@ export interface MeanRetentionValue {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface retentionLogicValues {cohortsById: Partial<Record<number | string, CohortType>> // cohortsModel- featureFlags: FeatureFlagsSet // featureFlagLogicbreakdownFilter: BreakdownFilter | null | undefined // insightVizDataLogicdateRange: DateRange | null | undefined // insightVizDataLogicgetTheme: (themeId: number | string | null | undefined) => DataColorTheme | null // insightVizDataLogic@@ -100,7 +96,6 @@ export interface retentionLogicValues {hasEntityPropertyFilters: booleanhasValidBreakdown: booleanisPropertyValueAggregation: boolean- isRetentionDWHEnabled: booleanlocalCustomBrackets: (number | string)[]results: ProcessedRetentionPayload[]retentionMeans: Record<string, MeanRetentionValue>@@ -149,7 +144,6 @@ export interface retentionLogicMeta {key: string__keaTypeGenInternalSelectorTypes: {hasValidBreakdown: (breakdownFilter: BreakdownFilter | null | undefined) => boolean- isRetentionDWHEnabled: (featureFlags: FeatureFlagsSet) => booleanisPropertyValueAggregation: (retentionFilter: RetentionFilter | null) => booleanhasEntityPropertyFilters: (retentionFilter: RetentionFilter | null) => booleanallCohortsEmpty: (results: ProcessedRetentionPayload[]) => boolean@@ -233,8 +227,6 @@ export const retentionLogic = kea<retentionLogicType>([],teamLogic,['timezone'],- featureFlagLogic,- ['featureFlags'],cohortsModel,['cohortsById'],],@@ -343,11 +335,6 @@ export const retentionLogic = kea<retentionLogicType>([(breakdownFilter: null | import('~/queries/schema/schema-general').BreakdownFilter | undefined) =>hasBreakdownFilter(breakdownFilter),],- isRetentionDWHEnabled: [- (s) => [s.featureFlags],- (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): boolean =>- !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_RETENTION_DWH],- ],isPropertyValueAggregation: [(s) => [s.retentionFilter],(retentionFilter: RetentionFilter | undefined) =>