From 988ef81922fdb2784c87b3127436a5d361bf62a8 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Wed, 10 Jun 2026 16:33:59 +0200 Subject: [PATCH] ci: tolerate cache-satisfied specs in the buildcache pushes - buildcache push expands its selection into the full dependency closure, build-time dependencies included; specs that were satisfied from the buildcache do not have those installed locally, and the push fails with PackageNotInstalledError - both push sites (the early gcc node push and the env-level push) only ever ran in fresh-build scenarios before, so the failure surfaced once the cache was warm - pass --allow-missing to skip what is not installed (a best-effort push of everything that is); a freshly built gcc thus still uploads its build-time dependencies, which a future gcc rebuild can then pull as binaries --- .github/actions/setup-deps/action.yml | 5 ++++- .github/workflows/buildcache.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 81b94054..2a78282d 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -56,8 +56,11 @@ runs: # Push the gcc node now, BEFORE `spack compiler find` registers it as an # external -- externals are excluded from `buildcache push`. This is what # lets CI pull gcc from the cache (~1 min) instead of building it (~1 h). + # --allow-missing: when gcc itself was pulled from the cache, its + # build-time dependencies are not installed locally and would + # otherwise fail the push. spack mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache - spack buildcache push --unsigned ghcr-buildcache /$gcc_hash + spack buildcache push --unsigned --allow-missing ghcr-buildcache /$gcc_hash fi spack compiler find "$(spack location -i /$gcc_hash)" echo "::endgroup::" diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml index 955eafd5..ab7179e6 100644 --- a/.github/workflows/buildcache.yml +++ b/.github/workflows/buildcache.yml @@ -50,7 +50,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache - spack -e fairmq buildcache push --unsigned ghcr-buildcache + # --allow-missing: build-time dependencies of specs that were + # satisfied from the buildcache are not installed locally and + # would otherwise fail the whole push. + spack -e fairmq buildcache push --unsigned --allow-missing ghcr-buildcache update-index: if: github.repository == 'FairRootGroup/FairMQ' && !cancelled()