: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(data-warehouse): add 1 missing table to the Chameleon source (#118284)
Tom Owersc9ebdd46443f
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.mdindex f50876963a37..514119c20037 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md@@ -2295,7 +2295,7 @@ Diffed against: <https://developers.chameleon.io/apis/overview.md>- [x] `GET /v3/edit/tooltips` — a whole experience type missing alongside tours, launchers and surveys (medium)- [x] `GET /v3/edit/tags` — lookup resolving the tag IDs used to organize experiences (medium)- [x] `GET /v3/edit/properties (Data Properties)` — lookup of the property definitions sent on profiles and companies, needed to interpret their semi-arbitrary property blobs (medium)-- [ ] `GET /v3/edit/deliveries (Experience Deliveries)` — records of experiences targeted at specific users, the delivery side of the interaction funnel (medium)+- [x] `GET /v3/edit/deliveries (Experience Deliveries)` — records of experiences targeted at specific users, the delivery side of the interaction funnel (medium)Note: Chameleon's published OpenAPI at developers.chameleon.io/api-reference/openapi.json is a stub (it documents a /plants toy API), so the authoritative endpoint table is the markdown overview page. Alert groups, rate limit groups, webhooks, domains and data imports were excluded as config/plumbing. Embeddables, Product Demos and Changes have doc pages in llms.txt but do not appear in the overview endpoint table, so no list endpoint could be confirmed for them - they are not reported as gaps.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/canonical_descriptions.pyindex a74e1e21941c..593c0c554045 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/canonical_descriptions.py@@ -218,4 +218,28 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"profile": "The User Profile this interaction belongs to.",},},+ "deliveries": {+ "description": "An Experience Delivery: a request to trigger one Tour or Microsurvey for one specific User Profile.",+ "docs_url": "https://developers.chameleon.io/apis/deliveries",+ "columns": {+ "id": _ID,+ "created_at": _CREATED_AT,+ "updated_at": _UPDATED_AT,+ "model_id": "The Chameleon ID of the Experience this Delivery triggers.",+ "model_kind": "The kind of Experience this Delivery triggers: 'tour' or 'survey' (Microsurvey).",+ "profile_id": "The Chameleon ID of the User Profile this Delivery targets.",+ "idempotency_key": "A key that enforces server-side at-most-once delivery for the User Profile.",+ "options": "Content for the Experience, accessible via merge tags.",+ "from": "The time before which this Delivery does not run.",+ "until": "The time after which this Delivery is no longer valid.",+ "use_segmentation": "Whether the Experience's Segment must match the user before the Experience shows.",+ "once": "Whether to check if the user has seen this Experience before.",+ "skip_triggers": "Whether to bypass the triggers, elements and delays on the first step.",+ "skip_url_match": "Whether to bypass the URL match on the first step.",+ "at": "When this Delivery was triggered for the user. Null while the Delivery is pending.",+ "at_href": "The page URL where this Delivery was triggered for the user.",+ "interaction_id": "The Chameleon ID of the Tour Interaction this Delivery triggered.",+ "group_kind": "The system that triggered the Experience: 'link', 'api_js', 'launcher', 'experiment', 'campaign' or 'delivery'.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/settings.pyindex 910272ef5e98..ea0c6fda0173 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/settings.py@@ -42,6 +42,7 @@ CHAMELEON_ENDPOINTS: dict[str, ChameleonEndpointConfig] = {"tooltips": ChameleonEndpointConfig(name="tooltips", path="/edit/tooltips", data_key="tooltips"),"tags": ChameleonEndpointConfig(name="tags", path="/edit/tags", data_key="tags"),"event_names": ChameleonEndpointConfig(name="event_names", path="/edit/event_names", data_key="event_names"),+ "deliveries": ChameleonEndpointConfig(name="deliveries", path="/edit/deliveries", data_key="deliveries"),# /edit/properties requires `kind` and returns the whole matching set in one un-paginated# response, so a complete table means one request per documented kind."properties": ChameleonEndpointConfig(diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/tests/test_chameleon.py b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/tests/test_chameleon.pyindex 87582edd8d64..2eedb185a4d2 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/tests/test_chameleon.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/chameleon/tests/test_chameleon.py@@ -91,17 +91,19 @@ class TestStandardEndpointPagination:[# /analyze/profiles answers 422 to the `limit=500` the other list endpoints accept, so# it must go out with no `limit` and let Chameleon pick the page size.- ("profiles_sends_no_limit", "profiles", None),- ("other_endpoints_keep_the_page_size", "segments", "500"),+ ("profiles_sends_no_limit", "profiles", "/v3/analyze/profiles", None),+ ("other_endpoints_keep_the_page_size", "segments", "/v3/edit/segments", "500"),+ ("deliveries_keep_the_page_size", "deliveries", "/v3/edit/deliveries", "500"),])def test_page_size_is_only_sent_where_the_endpoint_accepts_it(- self, _name: str, endpoint: str, expected_limit: str | None+ self, _name: str, endpoint: str, expected_path: str, expected_limit: str | None) -> None:result = _driver().run(endpoint, [_response(endpoint, [{"id": "X1"}])])assert result.raised is Noneassert [row["id"] for row in result.rows] == ["X1"]+ assert result.paths == [expected_path]assert result.params("limit") == [expected_limit]def test_stops_when_cursor_missing(self) -> None: