Skip to content

: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.

fix(data-warehouse): give the buffered-dispatch fake schema an explicit is_xmin (#108897)

Kim Svatos Dugan1c66a26fd9f9
diff --git a/products/warehouse_sources/backend/temporal/data_imports/cdc/tests/test_buffered_dispatch.py b/products/warehouse_sources/backend/temporal/data_imports/cdc/tests/test_buffered_dispatch.py
index 0bb01a121dcb..7ee3d613b62b 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/cdc/tests/test_buffered_dispatch.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/cdc/tests/test_buffered_dispatch.py
@@ -23,6 +23,9 @@ def _schema(ingest_mode: str = "buffered", **overrides) -> MagicMock:
schema.cdc_mode = overrides.get("cdc_mode", "streaming")
schema.cdc_table_mode = overrides.get("cdc_table_mode", "consolidated")
schema.initial_sync_complete = overrides.get("initial_sync_complete", True)
+ # Explicit: an unset MagicMock attribute is truthy, which would send the snapshot path into the
+ # xmin cursor branch and fail on the missing cursor manager.
+ schema.is_xmin = overrides.get("is_xmin", False)
schema.sync_type_config = {}
schema.schema_metadata = {}
schema.resolved_s3_folder_name = None