: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(hubspot): classify portal migration as a retryable error (#111176)
Tom Owersccc054c4614f
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.pyindex a64231a3d731..552158a02783 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py@@ -173,6 +173,10 @@ class HubspotSource(ResumableSource[HubspotSourceConfig | HubspotSourceOldConfig# documented rate-limit wording so this self-recovering condition doesn't get tracked# as noise once Temporal's activity retry picks it back up."You have reached your rate limit.",+ # auth.hubspot_refresh_access_token also raises this verbatim (same retry budget as+ # above) while HubSpot migrates a portal between data centers; the portal becomes+ # reachable again once the migration finishes, so it's self-recovering rather than a bug.+ "Migration in progress",}# TODO: clean up hubspot job inputs to not have two auth config optionsdiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/test/test_source_routing.py b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/test/test_source_routing.pyindex 4e879d38eb17..2d515b1ac0c0 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/test/test_source_routing.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/test/test_source_routing.py@@ -313,6 +313,8 @@ def test_missing_token_error_is_non_retryable(error_msg: str) -> None:"url=https://api.hubapi.com/crm/v4/associations/contacts/deals/batch/read",# auth.hubspot_refresh_access_token, exhausted after tenacity's 5 in-process attempts"You have reached your rate limit.",+ # auth.hubspot_refresh_access_token, raised verbatim while HubSpot migrates a portal+ "Migration in progress and the portal is not available for access.",],)def test_transient_http_error_is_retryable(error_msg: str) -> None: