: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(warehouse-sources): give append rollback tests their own queue tables (#120643)
Georges-Antoine Assie2b18d59c206
diff --git a/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/conftest.py b/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/conftest.pynew file mode 100644index 000000000000..e4eb7558c20c--- /dev/null+++ b/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/conftest.py@@ -0,0 +1,21 @@+from typing import Any++import pytest++import psycopg++from products.warehouse_sources_queue.backend.testing import ensure_queue_tables, get_test_database_url++[email protected](scope="package")+def _queue_tables(django_db_setup: Any, django_db_blocker: Any) -> None:+ with django_db_blocker.unblock():+ with psycopg.connect(get_test_database_url(), autocommit=True) as conn:+ ensure_queue_tables(conn)+++def queue_database(_queue_tables: None, settings: Any) -> str:+ url = get_test_database_url()+ settings.WAREHOUSE_SOURCES_DATABASE_URL = url+ return urldiff --git a/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/test_append_rollback.py b/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/test_append_rollback.pyindex 611edecb99d6..a58b1162fe57 100644--- a/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/test_append_rollback.py+++ b/products/warehouse_sources/backend/temporal/data_imports/pipelines/pipeline_v3/load/test_append_rollback.py@@ -136,7 +136,7 @@ class _Loader:@pytest.fixture(autouse=True)-def _boundaries(settings: Any) -> Iterator[None]:+def _boundaries(settings: Any, queue_database: str) -> Iterator[None]:settings.DATA_WAREHOUSE_APPEND_ROLLBACK_ENABLED = Truewith ExitStack() as stack:for target in (