: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
feat(warehouse_sources): support Intercom API version 2.16 (#74145)
Tom Owerscb451c6048a1
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/source.pyindex 30efd7b91eb3..15e6240437bf 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/source.py@@ -36,8 +36,8 @@ from products.warehouse_sources.backend.types import ExternalDataSourceType@SourceRegistry.registerclass IntercomSource(SimpleSource[IntercomSourceConfig], OAuthMixin):lists_tables_without_credentials = True # static endpoint catalog — safe for public docs- supported_versions = ("2.13", "2.15")- default_version = "2.15"+ supported_versions = ("2.13", "2.15", "2.16")+ default_version = "2.16"api_docs_url = "https://developers.intercom.com/docs/references/rest-api"@propertydiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/tests/test_intercom_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/tests/test_intercom_source.pyindex 8cce77e8b1e1..ea3f70429c61 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/tests/test_intercom_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/intercom/tests/test_intercom_source.py@@ -24,10 +24,13 @@ class TestIntercomSource:def test_default_version_is_latest(self):# New sources are stamped with the default; keep it on the newest supported version.- assert self.source.default_version == "2.15"+ assert self.source.default_version == "2.16"assert self.source.default_version in self.source.supported_versions- @pytest.mark.parametrize("pinned,expected", [(None, "2.15"), ("", "2.15"), ("2.13", "2.13"), ("2.15", "2.15")])+ @pytest.mark.parametrize(+ "pinned,expected",+ [(None, "2.16"), ("", "2.16"), ("2.13", "2.13"), ("2.15", "2.15"), ("2.16", "2.16")],+ )@mock.patch("products.warehouse_sources.backend.temporal.data_imports.sources.intercom.source.intercom_source")@mock.patch("products.warehouse_sources.backend.temporal.data_imports.sources.intercom.source.IntercomSource.get_oauth_integration"@@ -136,9 +139,9 @@ class TestIntercomSource:assert error is Nonemock_get_integration.assert_called_once_with(self.config.intercom_integration_id, self.team_id)# No pin passed (pre-creation), so the probe runs on default_version.- mock_validate.assert_called_once_with("token", schema_name=None, api_version="2.15")+ mock_validate.assert_called_once_with("token", schema_name=None, api_version="2.16")- @pytest.mark.parametrize("pin,expected", [("2.13", "2.13"), ("2.15", "2.15"), (None, "2.15")])+ @pytest.mark.parametrize("pin,expected", [("2.13", "2.13"), ("2.15", "2.15"), ("2.16", "2.16"), (None, "2.16")])@mock.patch("products.warehouse_sources.backend.temporal.data_imports.sources.intercom.source.validate_intercom_credentials")