From 3ec2440bd1d1763b3dc92a673e2d93746657b816 Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 15:16:25 -0300 Subject: [PATCH] Probe which actions/cache variant can reach the v2 cache service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first probe answered the original question and raised a better one. ACTIONS_CACHE_URL is unset but ACTIONS_RESULTS_URL points at gitea-unsupervised-git-http.gitea.svc.cluster.local:3000, so the runner does serve a cache — the v2 service, not v1. actions/cache resolves to v4.3.0, which can speak v2, but only when ACTIONS_CACHE_SERVICE_V2 is set, and the runner does not set it. So the action falls back to v1, finds no endpoint, and trips its GHES gate on the way past. Three variants to find one that reaches the service that is already running: v4 with the flag forced, v6.1.0 which is current, and v6 with the flag. Any that saves is a fix that lives in this repository. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/cache-probe.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.gitea/workflows/cache-probe.yml b/.gitea/workflows/cache-probe.yml index 066404d..036102c 100644 --- a/.gitea/workflows/cache-probe.yml +++ b/.gitea/workflows/cache-probe.yml @@ -51,3 +51,41 @@ jobs: run: | echo "runner.arch = ${{ runner.arch }}" echo "runner.os = ${{ runner.os }}" + + # The first probe showed ACTIONS_CACHE_URL unset but ACTIONS_RESULTS_URL set, + # i.e. the runner serves the v2 cache service and not v1. actions/cache v4.3 + # can speak v2, but only when ACTIONS_CACHE_SERVICE_V2 is set, and it is not. + # These three variants test the ways round that. + variant-v4-flag: + name: cache@v4 + ACTIONS_CACHE_SERVICE_V2 + runs-on: ubuntu-latest + env: + ACTIONS_CACHE_SERVICE_V2: "true" + steps: + - run: mkdir -p /tmp/probe && head -c 1048576 /dev/urandom > /tmp/probe/blob + - uses: actions/cache@v4 + with: + path: /tmp/probe + key: probe-v4flag-${{ github.run_id }} + + variant-v6: + name: cache@v6 + runs-on: ubuntu-latest + steps: + - run: mkdir -p /tmp/probe && head -c 1048576 /dev/urandom > /tmp/probe/blob + - uses: actions/cache@v6 + with: + path: /tmp/probe + key: probe-v6-${{ github.run_id }} + + variant-v6-flag: + name: cache@v6 + ACTIONS_CACHE_SERVICE_V2 + runs-on: ubuntu-latest + env: + ACTIONS_CACHE_SERVICE_V2: "true" + steps: + - run: mkdir -p /tmp/probe && head -c 1048576 /dev/urandom > /tmp/probe/blob + - uses: actions/cache@v6 + with: + path: /tmp/probe + key: probe-v6flag-${{ github.run_id }}