From 3407fecc7960165529ee68ba9230a569c9b697fd Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 25 Apr 2025 12:34:12 -0300 Subject: [PATCH] chore: Increase timeout for codspeed workflow and fix typo in configuration (#7598) * fix: correct typo in pyproject.toml timeout configuration Updated the timeout_method key in the pytest.ini_options section from 'tiemout_method' to 'timeout_method' for proper functionality. * chore: increase timeout for codspeed workflow to 600 seconds Updated the codspeed workflow configuration to extend the timeout limit, ensuring more robust execution during CI processes. * fix: Update assertion in TestGraphRAGComponent to use set comparison for improved clarity and performance * fix: Change pytest timeout method from thread to signal for improved reliability --- .github/workflows/codspeed.yml | 1 + pyproject.toml | 2 +- .../components/vectorstores/test_graph_rag_component.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 96ff87070..ae26b9005 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -43,5 +43,6 @@ jobs: --codspeed \ -m "not api_key_required" \ -n auto + --timeout 600 - name: Minimize uv cache run: uv cache prune --ci diff --git a/pyproject.toml b/pyproject.toml index f1ead3c7a..059b3c361 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ ignore-regex = '.*(Stati Uniti|Tense=Pres).*' [tool.pytest.ini_options] timeout = 120 -tiemout_method = "thread" +timeout_method = "signal" minversion = "6.0" testpaths = ["tests", "integration"] console_output_style = "progress" diff --git a/src/backend/tests/unit/components/vectorstores/test_graph_rag_component.py b/src/backend/tests/unit/components/vectorstores/test_graph_rag_component.py index 4b065e6e4..9bdf2c636 100644 --- a/src/backend/tests/unit/components/vectorstores/test_graph_rag_component.py +++ b/src/backend/tests/unit/components/vectorstores/test_graph_rag_component.py @@ -159,6 +159,6 @@ class TestGraphRAGComponent(ComponentTestBaseWithoutClient): # Ensures all the k-start_k documents returned via traversal have the same metadata as the # ones returned via the similarity search - assert list({doc.data["type"] for doc in results if doc.data["_depth"] == 0}) == list( - {doc.data["type"] for doc in results if doc.data["_depth"] >= 1} - ) + assert {doc.data["type"] for doc in results if doc.data["_depth"] == 0} == { + doc.data["type"] for doc in results if doc.data["_depth"] >= 1 + }