From ff3549662446483abe6516e41e1764b2234a88fc Mon Sep 17 00:00:00 2001 From: Dan Notestein Date: Wed, 31 Dec 2025 16:48:25 -0500 Subject: [PATCH] Fix tests_api submodule initialization for CI tests The tests_api submodule (containing validate_response module) was not being initialized in CI, causing all Tavern API tests to fail with "ModuleNotFoundError: No module named 'validate_response'". This happened because: 1. GIT_SUBMODULE_STRATEGY is set to 'none' (manual init required) 2. The .init_submodules script only initialized haf, reputation_tracker, and hafah - but not tests_api 3. The recent switch to GIT_STRATEGY: fetch meant existing checkouts were reused without the missing submodule content Fix: - Add tests_api to the .init_submodules script for consistency - Add inline tests_api initialization to e2e_benchmark_on_postgrest job --- .gitlab-ci.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml index 51165cb89..20f9ab485 100644 --- a/.gitlab-ci.yaml +++ b/.gitlab-ci.yaml @@ -208,6 +208,16 @@ default: git submodule update --init --recursive --jobs 4 cd ../.. + # Initialize tests_api submodule (no nested submodules) + TESTS_API_URL="https://gitlab.syncad.com/hive/tests_api.git" + TESTS_API_COMMIT=$(git ls-tree HEAD tests/tests_api | awk '{print $3}') + echo "Initializing tests_api submodule at commit $TESTS_API_COMMIT" + sudo rm -rf tests/tests_api 2>/dev/null || rm -rf tests/tests_api + git clone --no-checkout "$TESTS_API_URL" tests/tests_api + cd tests/tests_api + git checkout $TESTS_API_COMMIT + cd ../.. + echo -e "\e[0Ksection_end:$(date +%s):init_submodules\r\e[0K" .shared_tags: @@ -1329,6 +1339,14 @@ e2e_benchmark_on_postgrest: FORCE_NFS_CACHE: "${FORCE_NFS_CACHE:-0}" before_script: - *extract-nfs-cache-before-script + - | + # Initialize tests_api submodule for validate_response module + TESTS_API_URL="https://gitlab.syncad.com/hive/tests_api.git" + TESTS_API_COMMIT=$(git ls-tree HEAD tests/tests_api | awk '{print $3}') + echo "Initializing tests_api submodule at commit $TESTS_API_COMMIT" + sudo rm -rf tests/tests_api 2>/dev/null || rm -rf tests/tests_api + git clone --no-checkout "$TESTS_API_URL" tests/tests_api + cd tests/tests_api && git checkout $TESTS_API_COMMIT && cd ../.. - pip install --quiet tox script: - | -- GitLab