From 19a89018a03adcaec75067f6060ed35e41144b7f Mon Sep 17 00:00:00 2001 From: cesnimda Date: Mon, 31 Aug 2026 22:23:32 +0200 Subject: [PATCH] fix(ci): retry corrupt parser downloads --- .gitea/workflows/ci-deploy.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index 520b87a..514bd90 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -73,12 +73,18 @@ jobs: # The Debian runner omits pip and python3-venv. Use pip's official # zipapp and install into the checkout so CI remains isolated without # sudo or a mutable runner-global Python environment. - rm -rf .python-ci curl -fsSLo /tmp/pip.pyz https://bootstrap.pypa.io/pip/pip.pyz - python3 /tmp/pip.pyz install --target .python-ci --require-hashes \ - --extra-index-url https://download.pytorch.org/whl/cpu \ - -r requirements-linux.lock - python3 /tmp/pip.pyz install --target .python-ci pytest==8.3.5 httpx2==2.12.0 + install_parser_dependencies() { + rm -rf .python-ci + parser_pip_cache="$(mktemp -d)" + PIP_CACHE_DIR="$parser_pip_cache" python3 /tmp/pip.pyz install --target .python-ci --require-hashes \ + --extra-index-url https://download.pytorch.org/whl/cpu \ + -r requirements-linux.lock + } + install_parser_dependencies \ + || ( echo "Parser dependency install failed ($?) — retrying with a fresh isolated cache..." \ + && install_parser_dependencies ) + PIP_CACHE_DIR="$parser_pip_cache" python3 /tmp/pip.pyz install --upgrade --target .python-ci pytest==8.3.5 httpx2==2.12.0 PYTHONPATH="$PWD/.python-ci" AI_SERVICE_SKIP_MODEL_LOAD=1 python3 -m pytest -q - name: Restore backend