Skip to content

fix: don't nuke all ic-build image cache#10134

Open
nmattia wants to merge 2 commits intomasterfrom
nm-no-image-nuke
Open

fix: don't nuke all ic-build image cache#10134
nmattia wants to merge 2 commits intomasterfrom
nm-no-image-nuke

Conversation

@nmattia
Copy link
Copy Markdown
Contributor

@nmattia nmattia commented May 8, 2026

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.

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.
@github-actions github-actions Bot added the fix label May 8, 2026
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):"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would probably make sense to print this after the container has run, otherwise users might be try to run the command from within the container

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although they might not see it then anymore since after exiting your session I would expect most users to also exit their terminal soon after.

@nmattia nmattia marked this pull request as ready for review May 8, 2026 09:35
@nmattia nmattia requested a review from a team as a code owner May 8, 2026 09:35
@github-actions github-actions Bot added the @idx label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants