: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
fix(data-warehouse): clarify the ga4 built-in report name error (#112669)
Tom Owers090e4536da6b
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/settings.pyindex a795835f55b3..2d91a84a38c6 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/settings.py@@ -235,7 +235,8 @@ def parse_custom_reports(custom_reports_json: str | None) -> dict[str, GoogleAnaif name in GOOGLE_ANALYTICS_REPORT_SCHEMAS:raise CustomReportError(- f"'{name}' is a built-in report name. Choose a different name for your custom report."+ f"'{name}' is already a built-in report you can select on the next step. "+ "Give your custom report a different name.")if name in reports:raise CustomReportError(f"Duplicate custom report name '{name}'. Each report needs a unique name.")diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.pyindex 28e003eb049c..c82ddfb57587 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py@@ -103,7 +103,7 @@ def test_parse_custom_reports_empty_input_returns_no_reports():("not json", "valid JSON"),('{"name": "x"}', "JSON array"),('[{"dimensions": ["a"], "metrics": ["sessions"]}]', "non-empty 'name'"),- ('[{"name": "website_overview", "dimensions": [], "metrics": ["sessions"]}]', "built-in report name"),+ ('[{"name": "website_overview", "dimensions": [], "metrics": ["sessions"]}]', "already a built-in report"),('[{"name": "dup", "metrics": ["sessions"]}, {"name": "dup", "metrics": ["sessions"]}]',"Duplicate custom report name",