: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(batch-exports): Add more exceptions to retry loop (#66387)
Tomás Farías Santanabacdcfaf87bc
diff --git a/posthog/temporal/tests/product_analytics/__snapshots__/test_upgrade_queries_workflow.ambr b/posthog/temporal/tests/product_analytics/__snapshots__/test_upgrade_queries_workflow.ambrindex a1c0325ab25a..0839c952c78f 100644--- a/posthog/temporal/tests/product_analytics/__snapshots__/test_upgrade_queries_workflow.ambr+++ b/posthog/temporal/tests/product_analytics/__snapshots__/test_upgrade_queries_workflow.ambr@@ -11,14 +11,6 @@OR query @? '$.** ? (@.kind == "InsightVizNode" &&(!exists(@.version) || @.version == null || @.version < 4)- )'- OR query @? '$.** ? (- @.kind == "RetentionQuery" &&- (!exists(@.version) || @.version == null || @.version < 2)- )'- OR query @? '$.** ? (- @.kind == "StickinessQuery" &&- (!exists(@.version) || @.version == null || @.version < 2))'OR query @? '$.** ? (@.kind == "TrendsQuery" &&diff --git a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.pyindex 63439ede8877..b4e7704ca6c9 100644--- a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py+++ b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py@@ -21,6 +21,7 @@ import google.auth.exceptionsimport google.auth.transport.requestsimport google.auth.impersonated_credentialsfrom google.api_core.exceptions import (+ Aborted,BadRequest,Forbidden,GatewayTimeout,@@ -1220,7 +1221,7 @@ class BigQueryStorageConsumer(Consumer):stream = self.stream or self.start_stream()send = stream.send(req)return send.result()- except ServiceUnavailable:+ except (ServiceUnavailable, Aborted, InternalServerError):attempt += 1if attempt >= max_attempts:raise