: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(alerts): remove rolled-out 15-minute interval feature flag (#66451)
Matt Puab866fc86371d
diff --git a/frontend/src/lib/components/Alerts/views/EditAlertModal.tsx b/frontend/src/lib/components/Alerts/views/EditAlertModal.tsxindex 34722800f159..ce36c8aac2dc 100644--- a/frontend/src/lib/components/Alerts/views/EditAlertModal.tsx+++ b/frontend/src/lib/components/Alerts/views/EditAlertModal.tsx@@ -131,7 +131,6 @@ export function EditAlertModal({const anomalyDetectionEnabled = useFeatureFlag('ALERTS_ANOMALY_DETECTION')const inlineNotificationsEnabled = useFeatureFlag('ALERTS_INLINE_NOTIFICATIONS')const investigationAgentEnabled = useFeatureFlag('ALERTS_INVESTIGATION_AGENT')- const alerts15MinuteIntervalEnabled = useFeatureFlag('ALERTS_15_MINUTE_INTERVAL')const { hasAvailableFeature } = useValues(userLogic)const { guardAvailableFeature } = useValues(upgradeModalLogic)@@ -297,7 +296,6 @@ export function EditAlertModal({creatingNewAlert={creatingNewAlert}alert={alert}trendInterval={trendInterval}- alerts15MinuteIntervalEnabled={alerts15MinuteIntervalEnabled}hasHighFrequencyAlertsEntitlement={hasHighFrequencyAlertsEntitlement}guardAvailableFeature={guardAvailableFeature}nextPlannedEvaluationStale={nextPlannedEvaluationStale}diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 98636bd75cf3..b5f13960fba4 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -244,8 +244,6 @@ export const FEATURE_FLAGS = {ACTION_REFERENCE_COUNT: 'action-reference-count', // owner: @andyzzhao #team-product-analytics, gates bulk action reference counting on actions listADVANCE_MARKETING_ANALYTICS_SETTINGS: 'advance-marketing-analytics-settings', // owner: @jabahamondes #team-web-analyticsAI_GATEWAY: 'ai-gateway', // owner: #team-ai-gateway, gates the AI gateway UI and llm_gateway:read on project secret API keys- /** Alert edit modal: check history chart + chart/table toggle (table remains when off). */- ALERTS_15_MINUTE_INTERVAL: 'alerts-15-minute-interval', // owner: #team-analytics-platform, gates 15-minute insight alert intervalALERTS_ANOMALY_DETECTION: 'alerts-anomaly-detection', // owner: @andrewm4894ALERTS_INLINE_NOTIFICATIONS: 'alerts-inline-notifications', // owner: @vdekrijgerALERTS_INVESTIGATION_AGENT: 'alerts-investigation-agent', // owner: @andrewm4894, anomaly alerts — investigation agent on firingdiff --git a/posthog/api/test/test_alert_15_minute_interval.py b/posthog/api/test/test_alert_15_minute_interval.pyindex c6c88570c2df..7a4f3828d973 100644--- a/posthog/api/test/test_alert_15_minute_interval.py+++ b/posthog/api/test/test_alert_15_minute_interval.py@@ -4,7 +4,7 @@ from typing import Any, castimport pytestfrom freezegun import freeze_timefrom posthog.test.base import APIBaseTest-from unittest.mock import MagicMock, patch+from unittest.mock import MagicMockfrom rest_framework import status@@ -20,14 +20,7 @@ from posthog.tasks.alerts.utils import (from products.alerts.backend.models.alert import AlertConfiguration-@patch("products.alerts.backend.models.alert.posthoganalytics.feature_enabled")class TestAlert15MinuteInterval(APIBaseTest):- def _enable_feature_flag(self, mock_feature_enabled: MagicMock) -> None:- mock_feature_enabled.return_value = True-- def _disable_feature_flag(self, mock_feature_enabled: MagicMock) -> None:- mock_feature_enabled.return_value = False-def setUp(self):super().setUp()self.default_insight_data: dict[str, Any] = {@@ -64,30 +57,18 @@ class TestAlert15MinuteInterval(APIBaseTest):]self.organization.save()- def test_create_every_15_minutes_rejected_without_billing_entitlement(- self, mock_feature_enabled: MagicMock- ) -> None:- self._enable_feature_flag(mock_feature_enabled)+ def test_create_every_15_minutes_rejected_without_billing_entitlement(self) -> None:response = self.client.post(f"/api/projects/{self.team.id}/alerts", self._creation_request())assert response.status_code == status.HTTP_400_BAD_REQUESTassert "Boost, Scale, or Enterprise" in str(response.json())- def test_create_every_15_minutes_rejected_when_feature_flag_disabled(self, mock_feature_enabled: MagicMock) -> None:- self._disable_feature_flag(mock_feature_enabled)- self._enable_high_frequency_alerts()- response = self.client.post(f"/api/projects/{self.team.id}/alerts", self._creation_request())- assert response.status_code == status.HTTP_400_BAD_REQUEST- assert "not available for your organization yet" in str(response.json())-- def test_create_every_15_minutes_succeeds_with_entitlement(self, mock_feature_enabled: MagicMock) -> None:- self._enable_feature_flag(mock_feature_enabled)+ def test_create_every_15_minutes_succeeds_with_entitlement(self) -> None:self._enable_high_frequency_alerts()response = self.client.post(f"/api/projects/{self.team.id}/alerts", self._creation_request())assert response.status_code == status.HTTP_201_CREATED, response.contentassert response.json()["calculation_interval"] == AlertCalculationInterval.EVERY_15_MINUTES- def test_patch_every_15_minutes_succeeds_with_entitlement(self, mock_feature_enabled: MagicMock) -> None:- self._enable_feature_flag(mock_feature_enabled)+ def test_patch_every_15_minutes_succeeds_with_entitlement(self) -> None:self._enable_high_frequency_alerts()create_response = self.client.post(f"/api/projects/{self.team.id}/alerts", self._creation_request())alert_id = create_response.json()["id"]@@ -100,10 +81,7 @@ class TestAlert15MinuteInterval(APIBaseTest):assert response.json()["name"] == "updated 15 min alert"assert response.json()["calculation_interval"] == AlertCalculationInterval.EVERY_15_MINUTES- def test_patch_existing_every_15_minutes_rejected_after_entitlement_removed(- self, mock_feature_enabled: MagicMock- ) -> None:- self._enable_feature_flag(mock_feature_enabled)+ def test_patch_existing_every_15_minutes_rejected_after_entitlement_removed(self) -> None:self._enable_high_frequency_alerts()create_response = self.client.post(f"/api/projects/{self.team.id}/alerts", self._creation_request())alert_id = create_response.json()["id"]diff --git a/posthog/constants.py b/posthog/constants.pyindex 1d91e229bddc..825e0db0d791 100644--- a/posthog/constants.py+++ b/posthog/constants.py@@ -321,7 +321,6 @@ PRODUCT_TOUR_TARGETING_FLAG_PREFIX = "product-tour-targeting-"# Server-side evaluation via posthoganalytics; keep in sync with frontend FEATURE_FLAGS.SUBSCRIPTION_AI_SUMMARY_PROMPT_GUIDE_FEATURE_FLAG_KEY = "subscription-ai-summary-prompt-guide"SUBSCRIPTION_AI_PROMPT_FEATURE_FLAG_KEY = "ai-subscriptions"-ALERTS_15_MINUTE_INTERVAL_FEATURE_FLAG_KEY = "alerts-15-minute-interval"EXPERIMENTS_SYNC_QUERIES_FEATURE_FLAG_KEY = "experiments-sync-queries"GENERATED_DASHBOARD_PREFIX = "Generated Dashboard"diff --git a/products/alerts/backend/api/alert.py b/products/alerts/backend/api/alert.pyindex dfa203b2196f..56c54f095517 100644--- a/products/alerts/backend/api/alert.py+++ b/products/alerts/backend/api/alert.py@@ -52,12 +52,10 @@ from products.product_analytics.backend.models.insight import Insightdef _validate_every_15_minutes_interval(*,calculation_interval: str | AlertCalculationInterval | None,- request,organization,) -> None:if error := AlertConfiguration.every_15_minutes_interval_validation_error(calculation_interval=calculation_interval,- user_distinct_id=str(request.user.distinct_id),organization=organization,):raise ValidationError({"calculation_interval": [error]})@@ -640,7 +638,6 @@ class AlertSerializer(SearchMatchTypeSerializerMixin, serializers.ModelSerializeorganization = self.context["get_organization"]()_validate_every_15_minutes_interval(calculation_interval=calculation_interval,- request=self.context["request"],organization=organization,)diff --git a/products/alerts/backend/max_tools.py b/products/alerts/backend/max_tools.pyindex 5615659a3fd8..bba07e264a3d 100644--- a/products/alerts/backend/max_tools.py+++ b/products/alerts/backend/max_tools.py@@ -76,7 +76,7 @@ UPSERT_ALERT_TOOL_DESCRIPTION = dedent("""- For percentage-based thresholds, set threshold_type to "percentage" and use decimal values (e.g., 0.5 for 50%)# Calculation intervals- - **every_15_minutes**: Check every 15 minutes (Boost+ and feature flag required)+ - **every_15_minutes**: Check every 15 minutes (Boost+ required)- **hourly**: Check every hour- **daily**: Check once per day (default for create)- **weekly**: Check once per week@@ -150,7 +150,7 @@ class UpdateAlertAction(BaseModel):condition_type: AlertConditionType | None = Field(default=None, description="New condition type")calculation_interval: AlertCalculationInterval | None = Field(default=None,- description="New calculation interval (every_15_minutes requires Boost+ and feature flag)",+ description="New calculation interval (every_15_minutes requires Boost+)",)upper_threshold: float | None = Field(default=None, description="New upper threshold bound")lower_threshold: float | None = Field(default=None, description="New lower threshold bound")@@ -205,11 +205,9 @@ class UpsertAlertTool(MaxTool):existing_interval: str | AlertCalculationInterval | None = None,) -> str | None:team = self._team- user = self._userorg = await sync_to_async(lambda: team.organization)()return await sync_to_async(AlertConfiguration.every_15_minutes_interval_validation_error)(calculation_interval=calculation_interval or existing_interval,- user_distinct_id=str(user.distinct_id),organization=org,)diff --git a/products/alerts/backend/models/alert.py b/products/alerts/backend/models/alert.pyindex e99249a86038..4d7f1b267e5a 100644--- a/products/alerts/backend/models/alert.py+++ b/products/alerts/backend/models/alert.py@@ -12,9 +12,8 @@ if TYPE_CHECKING:from posthog.models.user import Userimport pydantic-import posthoganalytics-from posthog.constants import ALERTS_15_MINUTE_INTERVAL_FEATURE_FLAG_KEY, AvailableFeature+from posthog.constants import AvailableFeaturefrom posthog.models.activity_logging.model_activity import ModelActivityMixinfrom posthog.models.utils import CreatedMetaFields, UUIDTModelfrom posthog.schema_enums import AlertCalculationInterval, AlertState@@ -326,19 +325,10 @@ class AlertConfiguration(ModelActivityMixin, CreatedMetaFields, UUIDTModel):cls,*,calculation_interval: str | AlertCalculationInterval | None,- user_distinct_id: str,organization: Organization,) -> str | None:if calculation_interval != AlertCalculationInterval.EVERY_15_MINUTES:return None- if not posthoganalytics.feature_enabled(- ALERTS_15_MINUTE_INTERVAL_FEATURE_FLAG_KEY,- user_distinct_id,- groups={"organization": str(organization.id)},- group_properties={"organization": {"id": str(organization.id)}},- only_evaluate_locally=False,- ):- return "15-minute alert intervals are not available for your organization yet."if not cls.supports_high_frequency_intervals(organization):return "15-minute alert intervals require a Boost, Scale, or Enterprise platform add-on."return Nonediff --git a/products/alerts/frontend/components/editAlertModal/AlertIntervalRow.tsx b/products/alerts/frontend/components/editAlertModal/AlertIntervalRow.tsxindex b8342ad0be7a..d41c9c25d22c 100644--- a/products/alerts/frontend/components/editAlertModal/AlertIntervalRow.tsx+++ b/products/alerts/frontend/components/editAlertModal/AlertIntervalRow.tsx@@ -16,7 +16,6 @@ export interface AlertIntervalRowProps {creatingNewAlert: booleanalert: AlertType | null | undefinedtrendInterval: string | null | undefined- alerts15MinuteIntervalEnabled: booleanhasHighFrequencyAlertsEntitlement: booleanguardAvailableFeature: GuardAvailableFeatureFnnextPlannedEvaluationStale: boolean@@ -27,7 +26,6 @@ export function AlertIntervalRow({creatingNewAlert,alert,trendInterval,- alerts15MinuteIntervalEnabled,hasHighFrequencyAlertsEntitlement,guardAvailableFeature,nextPlannedEvaluationStale,@@ -50,10 +48,7 @@ export function AlertIntervalRow({className="w-36 shrink-0 whitespace-nowrap"data-attr="alertForm-calculation-interval"value={value}- options={getAlertIntervalOptions(- alerts15MinuteIntervalEnabled,- hasHighFrequencyAlertsEntitlement- )}+ options={getAlertIntervalOptions(hasHighFrequencyAlertsEntitlement)}onChange={(interval) => {selectAlertCalculationInterval(interval, {guardAvailableFeature,diff --git a/products/alerts/frontend/components/editAlertModal/editAlertModalUtils.tsx b/products/alerts/frontend/components/editAlertModal/editAlertModalUtils.tsxindex 5628e50de604..c0410b5652bf 100644--- a/products/alerts/frontend/components/editAlertModal/editAlertModalUtils.tsx+++ b/products/alerts/frontend/components/editAlertModal/editAlertModalUtils.tsx@@ -65,12 +65,9 @@ export const ALERT_INTERVAL_OPTIONS: AlertCalculationInterval[] = []export function getAlertIntervalOptions(- alerts15MinuteIntervalEnabled: boolean,hasHighFrequencyAlertsEntitlement: boolean): Array<{ label: string | JSX.Element; value: AlertCalculationInterval }> {- const intervals = alerts15MinuteIntervalEnabled- ? [AlertCalculationInterval.EVERY_15_MINUTES, ...ALERT_INTERVAL_OPTIONS]- : ALERT_INTERVAL_OPTIONS+ const intervals = [AlertCalculationInterval.EVERY_15_MINUTES, ...ALERT_INTERVAL_OPTIONS]return intervals.map((interval) => {const labelText = alertCalculationIntervalToLabel(interval)const showLock = interval === AlertCalculationInterval.EVERY_15_MINUTES && !hasHighFrequencyAlertsEntitlement