From b391bf238511b39444744b515798621c15dbba3f Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 15 Oct 2026 09:38:37 -0700 Subject: [PATCH] test(integration): scope the signoz, otel conversation id, and series cap proxy fixtures to their module Session scope booted one 2-worker proxy per xdist worker and kept it until the worker's session ended, so a CircleCI node holding two of these files piled up proxies until the VM stopped responding. Module scope lets the harness group each file's rig tests onto one worker and tears the proxies down after them. --- tests/integration/observability/conftest.py | 2 +- .../integration/observability/test_otel_conversation_id.py | 6 +++--- tests/integration/observability/test_signoz_delivery.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/observability/conftest.py b/tests/integration/observability/conftest.py index 101c2958b64..eb5c12a1cea 100644 --- a/tests/integration/observability/conftest.py +++ b/tests/integration/observability/conftest.py @@ -34,7 +34,7 @@ def langfuse_vars(audit_sinks: SpanSinks) -> dict[str, JsonValue]: return langfuse_callback_variables(audit_sinks) -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def capped(tmp_path_factory: pytest.TempPathFactory) -> Iterator[CapRig]: """A two-worker proxy capped at three series per metric, with three keys already holding a series each.""" with series_cap_rig( diff --git a/tests/integration/observability/test_otel_conversation_id.py b/tests/integration/observability/test_otel_conversation_id.py index 6d0e5ea197d..1589b2fa2f9 100644 --- a/tests/integration/observability/test_otel_conversation_id.py +++ b/tests/integration/observability/test_otel_conversation_id.py @@ -303,12 +303,12 @@ class RigFactory: yield Rig(owned.gateway, owned, model, self.provider, self.sink) -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def rig(provider: Wire, collector: Collector, tmp_path_factory: pytest.TempPathFactory) -> Iterator[Rig]: yield from RigFactory(provider, collector, tmp_path_factory.mktemp("otel"), {}, 2).start() -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def generating_rig(provider: Wire, collector: Collector, tmp_path_factory: pytest.TempPathFactory) -> Iterator[Rig]: factory: Final = RigFactory( provider, collector, tmp_path_factory.mktemp("otel-generate"), {"missing_session_id": "generate"}, 2 @@ -316,7 +316,7 @@ def generating_rig(provider: Wire, collector: Collector, tmp_path_factory: pytes yield from factory.start() -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def two_worker_rig(provider: Wire, collector: Collector, tmp_path_factory: pytest.TempPathFactory) -> Iterator[Rig]: yield from RigFactory(provider, collector, tmp_path_factory.mktemp("otel-workers"), {}, 2).start() diff --git a/tests/integration/observability/test_signoz_delivery.py b/tests/integration/observability/test_signoz_delivery.py index 5d4b66bbdd6..0bbcd8bc803 100644 --- a/tests/integration/observability/test_signoz_delivery.py +++ b/tests/integration/observability/test_signoz_delivery.py @@ -422,7 +422,7 @@ class RigFactory: yield Rig(owned.gateway, owned, model, self.provider, self.sink, self.tenant_sink) -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def rig( provider: Wire, operator_sink: Collector, tenant_sink: Collector, tmp_path_factory: pytest.TempPathFactory ) -> Iterator[Rig]: @@ -432,7 +432,7 @@ def rig( yield from factory.start() -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def v2_rig( provider: Wire, operator_sink: Collector, tenant_sink: Collector, tmp_path_factory: pytest.TempPathFactory ) -> Iterator[Rig]: