From b4a6f883ffb6cb77e1b3924082ddede7ff98338e Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Mon, 16 Jun 2025 10:58:59 -0400 Subject: [PATCH] Go back to randomized index names --- .github/workflows/on-pr.yaml | 2 +- tests/integration/helpers/helpers.py | 2 +- tests/integration/helpers/names.py | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 25253ec4..80406d71 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -48,7 +48,7 @@ jobs: - create-project with: encrypted_project_api_key: ${{ needs.create-project.outputs.encrypted_project_api_key }} - python_versions_json: '["3.9"]' + python_versions_json: '["3.13", "3.9"]' cleanup-project: if: ${{ always() }} diff --git a/tests/integration/helpers/helpers.py b/tests/integration/helpers/helpers.py index 8cb069dd..a9afdf54 100644 --- a/tests/integration/helpers/helpers.py +++ b/tests/integration/helpers/helpers.py @@ -75,7 +75,7 @@ def poll_stats_for_namespace( idx: _Index, namespace: str, expected_count: int, - max_sleep: int = int(os.environ.get("FRESHNESS_TIMEOUT_SECONDS", 60)), + max_sleep: int = int(os.environ.get("FRESHNESS_TIMEOUT_SECONDS", 180)), ) -> None: delta_t = 5 total_time = 0 diff --git a/tests/integration/helpers/names.py b/tests/integration/helpers/names.py index 8d24d8e3..f692561c 100644 --- a/tests/integration/helpers/names.py +++ b/tests/integration/helpers/names.py @@ -1,4 +1,5 @@ -import hashlib +import uuid +# import hashlib def generate_name(test_name: str, label: str, max_length: int = 20) -> str: @@ -11,4 +12,11 @@ def generate_name(test_name: str, label: str, max_length: int = 20) -> str: since the full length of 64 characters exceeds the allowed length of some fields in the API. For example, index names must be 45 characters or less. """ - return hashlib.sha256(f"{test_name}-{label}".encode()).hexdigest()[:max_length] + # return hashlib.sha256(f"{test_name}-{label}".encode()).hexdigest()[:max_length] + + # Having names be fully deterministic led to problems when multiple test builds + # are running in parallel, for example running the same tests in parallel for + # different python versions. We can solve this by incorporating more information + # into the name generation, but for now as a quick fix to unblock a release we + # will just fall back to using a random uuid. + return str(uuid.uuid4())