From 102e352d67214676b8519ef54d6d1f4c00bb6893 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Fri, 8 May 2026 11:23:38 +0200 Subject: [PATCH 1/2] fix: don't nuke all ic-build image cache This removes the automatic image pruning in container-run.sh and replaces it with a nudge in case the images start taking too much space. As far as I can tell, the previous pruning command would have the effect of nuking all prebuilt (and potentially reusable) layers, while at the same time ensuring that all previously built final images were kept. This means old unusable images would pile up, but intermediary layers would be nuked, leading to a lot of junk and no speedup. --- ci/container/container-run.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ci/container/container-run.sh b/ci/container/container-run.sh index acdb8edeb45f..16424946f0fe 100755 --- a/ci/container/container-run.sh +++ b/ci/container/container-run.sh @@ -133,8 +133,19 @@ elif ! "${CONTAINER_CMD[@]}" image exists $IMAGE; then fi if [ "$DEVENV" = true ]; then - eprintln "Purging non-relevant container images" - "${CONTAINER_CMD[@]}" image prune -a -f --filter "reference!=$IMAGE" + # on the devenv we issue a warning if the images start taking up a lot of space. + # Podman does not have a dedicated layer cache like docker, so we avoid nuking dangling/unused images unless space becomes a concern; + # this allows new image builds to benefit from cached layers. + # We only issue a warning so that the user can GC when it's most convenient. + MAX_GB=20 + images_rawsize=$(${CONTAINER_CMD[@]} system df --format json | jq -cMr '.[]|select(.Type == "Images")|.RawSize') + if (( $images_rawsize > $MAX_GB * 10**9 )); then + tput -T xterm setaf 3 + tput -T xterm bold + eprintln "Container images take up more than ${MAX_GB}GB. You can reclaim space by clearing the container image cache (will cause a rebuild):" + eprintln "> ${CONTAINER_CMD[@]} image prune --all --force --filter containers=false" + tput -T xterm sgr0 + fi fi WORKDIR="/ic" From 9291981724d43d636557b372981fff274b25c496 Mon Sep 17 00:00:00 2001 From: IDX GitHub Automation Date: Fri, 8 May 2026 09:33:26 +0000 Subject: [PATCH 2/2] Automatically fixing code for linting and formatting issues --- ci/container/container-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/container/container-run.sh b/ci/container/container-run.sh index 16424946f0fe..3ff5e18e84b3 100755 --- a/ci/container/container-run.sh +++ b/ci/container/container-run.sh @@ -139,7 +139,7 @@ if [ "$DEVENV" = true ]; then # We only issue a warning so that the user can GC when it's most convenient. MAX_GB=20 images_rawsize=$(${CONTAINER_CMD[@]} system df --format json | jq -cMr '.[]|select(.Type == "Images")|.RawSize') - if (( $images_rawsize > $MAX_GB * 10**9 )); then + if (($images_rawsize > $MAX_GB * 10 ** 9)); then tput -T xterm setaf 3 tput -T xterm bold eprintln "Container images take up more than ${MAX_GB}GB. You can reclaim space by clearing the container image cache (will cause a rebuild):"