Skip to content

Commit bb696b1

Browse files
committed
fix: remove sandbox image cache that adds ~4.5 min overhead per run
The sandbox image cache never provides a net time savings. The cache key is based on the image name (not its digest), so the cached tar is always stale. Every run pays the full cycle: restore, load, pull, save, upload (~4.5 min) when a bare pull takes ~30s. Remove the cache/restore, load, save, and cache/save steps entirely. Drop skopeo (only used for digest comparison in the cache logic). Simplify the pre-pull step to a straight podman pull. Closes #2222 Signed-off-by: Ralph Bean <rbean@redhat.com> Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
1 parent ce66d92 commit bb696b1

1 file changed

Lines changed: 1 addition & 55 deletions

File tree

action.yml

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ runs:
253253
shell: bash
254254
run: |
255255
sudo apt-get update
256-
sudo apt-get install -y podman skopeo
256+
sudo apt-get install -y podman
257257
podman --version
258258
259259
- name: Configure rootless Podman
@@ -286,66 +286,12 @@ runs:
286286
shell: bash
287287
run: "$GITHUB_ACTION_PATH/.github/scripts/install-openshell.sh"
288288

289-
- name: Restore cached sandbox image
290-
id: sandbox-cache
291-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
292-
with:
293-
path: /tmp/sandbox-image.tar
294-
key: sandbox-image-${{ runner.os }}-${{ runner.arch }}-${{ env.FULLSEND_SANDBOX_IMAGE || 'ghcr.io/fullsend-ai/fullsend-code:latest' }}
295-
restore-keys: |
296-
sandbox-image-${{ runner.os }}-${{ runner.arch }}-
297-
298-
- name: Load cached sandbox image
299-
if: steps.sandbox-cache.outputs.cache-hit == 'true'
300-
shell: bash
301-
run: podman load -i /tmp/sandbox-image.tar || echo "::warning::Cached image load failed; will pull fresh"
302-
303289
- name: Pre-pull sandbox image
304-
id: sandbox-pull
305290
shell: bash
306291
run: |
307292
IMAGE="${FULLSEND_SANDBOX_IMAGE:-ghcr.io/fullsend-ai/fullsend-code:latest}"
308293
echo "Pre-pulling sandbox image: ${IMAGE}"
309-
310-
LOCAL_DIGEST="$(podman image inspect --format '{{.Digest}}' -- "${IMAGE}" 2>/dev/null || true)"
311-
312-
if [[ -n "${LOCAL_DIGEST}" ]]; then
313-
# Check remote digest without pulling (~1s HEAD request).
314-
REMOTE_DIGEST="$(skopeo inspect --no-tags --format '{{.Digest}}' "docker://${IMAGE}" 2>/dev/null || true)"
315-
if [[ -z "${REMOTE_DIGEST}" ]]; then
316-
echo "Could not fetch remote digest; falling through to pull"
317-
elif [[ "${LOCAL_DIGEST}" == "${REMOTE_DIGEST}" ]]; then
318-
echo "Local image is current (digest ${LOCAL_DIGEST:0:19}…); skipping pull"
319-
exit 0
320-
else
321-
echo "Digest mismatch (local=${LOCAL_DIGEST:0:19}… remote=${REMOTE_DIGEST:0:19}…); pulling"
322-
fi
323-
fi
324-
325294
timeout 300 podman pull -- "${IMAGE}" || echo "::warning::Image pre-pull failed; sandbox create will pull on demand"
326-
PULLED_DIGEST="$(podman image inspect --format '{{.Digest}}' -- "${IMAGE}" 2>/dev/null || true)"
327-
if [[ "${LOCAL_DIGEST}" != "${PULLED_DIGEST}" ]]; then
328-
echo "changed=true" >> "${GITHUB_OUTPUT}"
329-
fi
330-
331-
- name: Save sandbox image for cache
332-
if: steps.sandbox-cache.outputs.cache-hit != 'true' || steps.sandbox-pull.outputs.changed == 'true'
333-
shell: bash
334-
run: |
335-
IMAGE="${FULLSEND_SANDBOX_IMAGE:-ghcr.io/fullsend-ai/fullsend-code:latest}"
336-
if podman image exists -- "${IMAGE}"; then
337-
rm -f /tmp/sandbox-image.tar
338-
podman save -o /tmp/sandbox-image.tar -- "${IMAGE}"
339-
else
340-
echo "::warning::Image not available to cache"
341-
fi
342-
343-
- name: Update sandbox image cache
344-
if: steps.sandbox-cache.outputs.cache-hit != 'true' || steps.sandbox-pull.outputs.changed == 'true'
345-
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
346-
with:
347-
path: /tmp/sandbox-image.tar
348-
key: sandbox-image-${{ runner.os }}-${{ runner.arch }}-${{ env.FULLSEND_SANDBOX_IMAGE || 'ghcr.io/fullsend-ai/fullsend-code:latest' }}
349295
350296
- name: Install validation dependencies
351297
shell: bash

0 commit comments

Comments
 (0)