: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(uptimerobot): stop tracking exhausted 429/5xx retries as exceptions (#73835)
Tom Owers1c1e0bf393dc
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/source.pyindex d64aa7e06700..a84bea370a2b 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/source.py@@ -89,6 +89,12 @@ Use your account's **read-only API key**, created under [Integrations & API](httAUTH_ERROR_PREFIX: "Your UptimeRobot API key is invalid or has been revoked. Create a new read-only API key under Integrations & API in your UptimeRobot dashboard, then reconnect.",}+ def get_retryable_errors(self) -> set[str]:+ # 429/5xx are already retried internally with backoff (see uptimerobot.py's tenacity-wrapped+ # _post); if those retries still exhaust, the failure is transient and self-recovering, so+ # let Temporal retry the activity without surfacing it as tracked exception noise.+ return {"UptimeRobot API error (retryable)"}+def get_schemas(self,config: UptimerobotSourceConfig,diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/tests/test_uptimerobot_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/tests/test_uptimerobot_source.pyindex 466bdce77f41..05ef418872cb 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/tests/test_uptimerobot_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/uptimerobot/tests/test_uptimerobot_source.py@@ -67,6 +67,20 @@ class TestUptimerobotSource: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(+ "error_message",+ [+ "UptimeRobot API error (retryable): status=429, method=getMonitors",+ "UptimeRobot API error (retryable): status=500, method=getMonitors",+ "UptimeRobot API error (retryable): status=503, method=getAlertContacts",+ ],+ )+ def test_retryable_errors_match_exhausted_backoff(self, error_message):+ # _post already retries 429/5xx internally with backoff; once those attempts are+ # exhausted, this must stay classified as retryable so it doesn't get tracked as noise.+ retryable_errors = self.source.get_retryable_errors()+ assert any(pattern in error_message for pattern in retryable_errors)+def test_get_schemas_match_endpoints_with_correct_sync_modes(self):schemas = {schema.name: schema for schema in self.source.get_schemas(self.config, self.team_id)}