From e36357eba6e5182832e3a288d4dfbe8b06180449 Mon Sep 17 00:00:00 2001 From: starlit Date: Sat, 1 Aug 2026 19:34:33 +0300 Subject: [PATCH] CI: retry the Qt install on Windows `aqt install-qt` fails intermittently on Windows with WARNING : Caught Bad7zFile, terminating installer workers ERROR : Specified path is bad: lib/cmake/Qt6ShaderToolsPrivate This is not a corrupt download. It is a false positive in py7zr's path traversal check, which rejects an output path that is genuinely inside the destination directory. The check was tightened for CVE-2026-23879, and the archive entry named in the error differs from run to run, so the same command succeeds on a later attempt. Reported upstream, still open: https://github.com/miurahr/aqtinstall/issues/995 https://github.com/miurahr/py7zr/issues/714 Route the three install-qt calls through a small `:install_qt` helper that retries up to three times before giving up. Failures still surface immediately when all attempts fail, so the fail-fast behaviour added earlier is preserved. Pinning py7zr below the version that introduced the check would also work, but that reintroduces the CVE it fixed, along with two other advisories fixed in the same release. Retrying costs a little CI time only on the runs that would otherwise have failed outright. --- .github/workflows/build.yml | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6b3963de..10ad40c81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,10 +212,24 @@ jobs: pip install -U pip pip install aqtinstall mkdir C:\Qt - python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 + call :install_qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 dir C:\Qt\6.9.3\msvc2022_64\bin curl.exe -L --retry 5 --retry-delay 5 --retry-all-errors "https://aka.ms/vs/17/release/vc_redist.x64.exe" -o "%GITHUB_WORKSPACE%\vc_redist.x64.exe" where iscc + goto :eof + + rem Retry aqt: on Windows it intermittently aborts with a spurious + rem "Bad7zFile: Specified path is bad", a false positive in py7zr's + rem path traversal check. The failing entry differs run to run, so a + rem repeat attempt usually succeeds. + rem See https://github.com/miurahr/aqtinstall/issues/995 + rem and https://github.com/miurahr/py7zr/issues/714 + :install_qt + for /l %%i in (1,1,3) do ( + python -m aqt install-qt %* && exit /b 0 + echo aqt install-qt failed on attempt %%i of 3 + ) + exit /b 1 - name: Build shell: cmd @@ -356,11 +370,25 @@ jobs: run: | pip install aqtinstall mkdir C:\Qt - python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 - python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_arm64_cross_compiled -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 + call :install_qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 + call :install_qt windows desktop 6.9.3 win64_msvc2022_arm64_cross_compiled -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools qtspeech || exit /b 1 dir C:\Qt\6.9.3\msvc2022_arm64\bin curl.exe -L --retry 5 --retry-delay 5 --retry-all-errors "https://aka.ms/vs/17/release/vc_redist.arm64.exe" -o "%GITHUB_WORKSPACE%\vc_redist.arm64.exe" where iscc + goto :eof + + rem Retry aqt: on Windows it intermittently aborts with a spurious + rem "Bad7zFile: Specified path is bad", a false positive in py7zr's + rem path traversal check. The failing entry differs run to run, so a + rem repeat attempt usually succeeds. + rem See https://github.com/miurahr/aqtinstall/issues/995 + rem and https://github.com/miurahr/py7zr/issues/714 + :install_qt + for /l %%i in (1,1,3) do ( + python -m aqt install-qt %* && exit /b 0 + echo aqt install-qt failed on attempt %%i of 3 + ) + exit /b 1 - name: Build shell: cmd