Skip to content

Conversation

@cgwalters
Copy link
Member

This cleans up disk space, which we're now hitting.

However to really be consistent we need to stop using container: in all jobs and switch to having this action run first step, and then spawn podman (or docker) inside jobs.

This cleans up disk space, which we're now hitting.

However to really be consistent we need to stop using `container:`
in all jobs and switch to having this action run first step,
and then spawn podman (or docker) inside jobs.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new composite GitHub Action, bootc-ubuntu-setup, designed to prepare an Ubuntu runner for bootc-related tasks. The action updates podman, frees up disk space by removing unneeded packages and data, configures KVM access, and sets an architecture environment variable. My review focuses on improving the efficiency and debuggability of the disk space cleanup script. I've suggested combining multiple apt-get calls into one for better performance and removing output redirection to /dev/null to aid in debugging potential failures.

Comment on lines +27 to +29
for x in ${unwanted[@]}; do
sudo apt-get remove -y $x > /dev/null
done

Choose a reason for hiding this comment

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

medium

This loop can be replaced by a single, more efficient apt-get remove command that processes all packages at once. This avoids invoking apt-get multiple times.

Additionally, I've removed the redirection to /dev/null in the suggestion. While it keeps the logs clean on success, it hides valuable error messages if a command fails, making debugging more difficult. GitHub Actions UI collapses logs for successful steps by default, so the extra output won't create much noise but will be invaluable in case of failure.

        sudo apt-get remove -y "${unwanted[@]}"

sudo apt-get remove -y $x > /dev/null
done
# Start other removal operations in parallel
sudo docker image prune --all --force > /dev/null &

Choose a reason for hiding this comment

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

medium

Consider removing the redirection to /dev/null. While it keeps the logs clean on success, it hides valuable error messages if the command fails, making debugging more difficult. Since this command runs in the background, its output will be critical for diagnostics if it fails and causes the wait command to exit with an error.

        sudo docker image prune --all --force &

@cgwalters cgwalters merged commit bfde071 into coreos:main Oct 6, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants