Skip to content

: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.

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.tsx
index 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-analytics
PRODUCT_ANALYTICS_QUARTER_YEAR_INTERVALS: 'product-analytics-quarter-year-intervals', // owner: @sampennington #team-product-analytics, gates quarter/year interval selection on insights
PRODUCT_ANALYTICS_RETENTION_AGGREGATION: 'retention-aggregation', // owner: @anirudhpillai #team-product-analytics
- PRODUCT_ANALYTICS_RETENTION_DWH: 'retention-dwh', // owner: @thmsobrmlr #team-product-analytics
PRODUCT_AUTONOMY: 'product-autonomy', // owner: #team-self-driving
PRODUCT_BUSINESS_KNOWLEDGE: 'product-business-knowledge', // owner: @veryayskiy #team-conversations
PRODUCT_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.tsx
index 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['ins
export 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.tsx
index 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.ts
index 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, pro
import { 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-genera
import { 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 // featureFlagLogic
breakdownFilter: BreakdownFilter | null | undefined // insightVizDataLogic
dateRange: DateRange | null | undefined // insightVizDataLogic
getTheme: (themeId: number | string | null | undefined) => DataColorTheme | null // insightVizDataLogic
@@ -100,7 +96,6 @@ export interface retentionLogicValues {
hasEntityPropertyFilters: boolean
hasValidBreakdown: boolean
isPropertyValueAggregation: boolean
- isRetentionDWHEnabled: boolean
localCustomBrackets: (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) => boolean
isPropertyValueAggregation: (retentionFilter: RetentionFilter | null) => boolean
hasEntityPropertyFilters: (retentionFilter: RetentionFilter | null) => boolean
allCohortsEmpty: (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) =>