: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(datadog): stop retrying syncs after a 410 Gone response (#87509)
Tom Owers25b907bce4c6
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/source.pyindex fe479a0afd78..88734607952a 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/source.py@@ -125,6 +125,7 @@ Logs, audit logs, and events read access is governed by your Datadog account's dreturn {"401 Client Error": "Invalid Datadog API key. Generate a valid key and reconnect.","403 Client Error": "Your Datadog application key is missing the required read scopes for this data. Grant the scopes and reconnect.",+ "410 Client Error: Gone": "The requested Datadog data has fallen outside your account's retention window, or its pagination cursor expired. Retry the sync to start a fresh query.",}def get_canonical_descriptions(self) -> CanonicalDescriptions:diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/tests/test_datadog_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/tests/test_datadog_source.pyindex b2338e0d253a..1715e465b3eb 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/tests/test_datadog_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/datadog/tests/test_datadog_source.py@@ -90,7 +90,7 @@ class TestDatadogSource:assert app_key_field.required is Trueassert app_key_field.secret is True- @pytest.mark.parametrize("expected_key", ["401 Client Error", "403 Client Error"])+ @pytest.mark.parametrize("expected_key", ["401 Client Error", "403 Client Error", "410 Client Error: Gone"])def test_non_retryable_errors(self, expected_key: str) -> None:assert expected_key in self.source.get_non_retryable_errors()