: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(warehouse-sources): stop reporting an exhausted monday.com retry as an exception (#95566)
Tom Owersa7f5cd90d654
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.pyindex 3a92d723b50c..c797b9fc8a01 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py@@ -46,6 +46,14 @@ class MondaySource(SimpleSource[MondaySourceConfig]):"monday.com GraphQL error: User unauthorized": "monday.com rejected the request. Please check that your API token has access to the requested data.",}+ def get_retryable_errors(self) -> set[str]:+ # `get_rows` already retries `MondayRetryableError` in-process with exponential backoff+ # (edge 404s, 429s, 5xx, and monday.com's own transient internal server errors — see+ # `_execute` in monday.py). Once that budget is exhausted the error still carries the+ # "(retryable)" tag those raises were given for this exact purpose, so Temporal's activity+ # retry can pick it back up without paging anyone on a monday.com-side blip.+ return {"(retryable)"}+@propertydef get_source_config(self) -> SourceConfig:return SourceConfig(diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.pyindex f1bdf2c61fee..5f3d5b216439 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py@@ -1,6 +1,7 @@import pytestfrom unittest import mock+from products.warehouse_sources.backend.temporal.data_imports.sources.common.base import error_message_matchesfrom products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.monday import MondaySourceConfigfrom products.warehouse_sources.backend.temporal.data_imports.sources.monday.settings import ENDPOINTSfrom products.warehouse_sources.backend.temporal.data_imports.sources.monday.source import MondaySource@@ -35,6 +36,17 @@ class TestMondaySource:non_retryable_errors = self.source.get_non_retryable_errors()assert not any(key in other_error for key in non_retryable_errors)+ @pytest.mark.parametrize(+ "observed_error",+ [+ "monday.com API error (retryable): status=500",+ "monday.com internal server error (retryable): Internal Server Error; Internal server error",+ ],+ )+ def test_retryable_errors_match_transient_monday_errors(self, observed_error):+ retryable_errors = self.source.get_retryable_errors()+ assert error_message_matches(observed_error, retryable_errors)+def test_get_schemas_are_full_refresh_only(self):schemas = self.source.get_schemas(self.config, self.team_id)