: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-modeling): stop blaming a customer for our proxy being down (#100896)
Jovan Sakovic6eccebffdbd2
diff --git a/posthog/temporal/data_modeling/activities/utils.py b/posthog/temporal/data_modeling/activities/utils.pyindex e2a7ebba60ac..0d9500f273a5 100644--- a/posthog/temporal/data_modeling/activities/utils.py+++ b/posthog/temporal/data_modeling/activities/utils.py@@ -97,6 +97,9 @@ EXTERNALLY_ABORTED_MARKERS = ("Code: 202", # TOO_MANY_SIMULTANEOUS_QUERIES"Cannot connect to host","Connection refused",+ # our own egress proxy was unreachable, so nothing left the cluster - the trailing colon keeps a+ # customer column of the same name out of the match, as with the two below+ "ProxyConnectionError: ",# the trailing colon is load-bearing: it keeps a customer column of the same name out of the match"QueueEmpty: ", # no root node to start from, so the graph was refused rather than the query"Preempted: ",diff --git a/posthog/temporal/tests/data_modeling/test_materialize_view_activities.py b/posthog/temporal/tests/data_modeling/test_materialize_view_activities.pyindex 48f6270503a5..65b00d1e1173 100644--- a/posthog/temporal/tests/data_modeling/test_materialize_view_activities.py+++ b/posthog/temporal/tests/data_modeling/test_materialize_view_activities.py@@ -564,6 +564,7 @@ class TestNodeSuspension:["Code: 202. DB::Exception: Too many simultaneous queries","Cannot connect to host ch-offline.example.com:8443",+ 'ProxyConnectionError: Failed to connect to proxy URL: "http://proxy.example.com:3128/"',"Abandoned: the materialization workflow is no longer running","QueueEmpty: Application error","Preempted: a new DAG run started before this job completed",@@ -600,7 +601,7 @@ class TestNodeSuspension:for job in jobs:await database_sync_to_async(job.delete)()- @pytest.mark.parametrize("identifier", ["Preempted", "QueueEmpty"])+ @pytest.mark.parametrize("identifier", ["Preempted", "QueueEmpty", "ProxyConnectionError"])async def test_suspends_when_a_customer_identifier_spells_an_abort_marker(self, ateam, anode, asaved_query, adag, identifier):