From b303d4775a6e1acd515e124160710a87c73e07d3 Mon Sep 17 00:00:00 2001 From: frstrtr Date: Mon, 6 Jul 2026 23:04:09 +0000 Subject: [PATCH] ci(coin-matrix): clear orphaned conan download tempfiles on self-hosted An interrupted or racing conan download can leave a partial conan_package.tgz in the reused ~/.conan2 cache, making the next conan install abort with "the file to download already exists" (seen on bch smoke, master 465ded92). Re-running alone cannot clear it since the tempfile persists on the runner. Add a self-hosted-gated pre-install step that deletes orphaned conan_package.tgz/conan_sources.tgz staging archives so a missing binary package re-fetches cleanly; extracted packages are untouched. --- .github/workflows/coin-matrix.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/coin-matrix.yml b/.github/workflows/coin-matrix.yml index 152579d2..5e39b422 100644 --- a/.github/workflows/coin-matrix.yml +++ b/.github/workflows/coin-matrix.yml @@ -89,6 +89,15 @@ jobs: if: steps.presence.outputs.exists == '1' && runner.environment != 'github-hosted' run: rm -rf build_${{ matrix.coin }} + - name: Clear orphaned Conan download tempfiles (self-hosted cache is reused) + if: steps.presence.outputs.exists == '1' && runner.environment != 'github-hosted' + # An interrupted or racing conan download can leave a partial conan_package.tgz + # in ~/.conan2 that makes the next `conan install` abort with + # "the file to download already exists". Delete these staging archives so a + # missing binary package can be re-fetched cleanly; extracted packages are untouched. + run: | + find ~/.conan2/p -type f \( -name 'conan_package.tgz' -o -name 'conan_sources.tgz' \) -delete 2>/dev/null || true + - name: Conan install if: steps.presence.outputs.exists == '1' run: |