Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,24 @@ jobs:
docker volume ls -q --filter "label=com.docker.compose.project=${proj}" \
| xargs -r docker volume rm -f || true

# Bound the shared earthly-buildkitd cache. It accumulates pulled base
# images and cache mounts (e.g. nixos/nix for compactc) across all slots
# on the self-hosted host, and is NOT covered by the local-env teardown
# above. Left unbounded it creeps toward the 1.7 TB /var ceiling and large
# link steps die with "No space left on device". buildctl prune is
# concurrency-safe (it skips records held by in-flight builds), and
# --keep-duration keeps a day of hot cache so other PRs still hit it. This
# does not change the daemon's settings hash, so it never restarts the
# shared buildkitd. The host-side reaper timer (shielded-iac runner role)
# is the backstop for slots whose job is hard-killed before this runs.
- name: Prune stale earthly buildkit cache (defensive)
if: always()
shell: bash
run: |
if docker inspect earthly-buildkitd >/dev/null 2>&1; then
docker exec earthly-buildkitd buildctl prune --keep-duration=24h || true
Comment thread
skylar-simoncelli marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point buildctl at the TCP daemon

On self-hosted runs where Earthly manages earthly-buildkitd with TCP transport (the repo’s self-hosted config disables TLS for that shared daemon), this docker exec invokes buildctl without --addr/BUILDKIT_HOST, so it falls back to the default Unix socket inside the container instead of the daemon’s TCP listener. The prune then fails and || true hides it, leaving the shared cache unbounded in exactly the disk-pressure scenario this step is meant to fix; pass the daemon address explicitly (for example the container-local TCP endpoint). Fresh evidence: the current .earthly/config.selfhosted.yml still configures the shared no-TLS Earthly daemon, while the added command still relies on buildctl defaults.

Useful? React with 👍 / 👎.

fi

- uses: ./.github/actions/tree-cache-guard/save
if: steps.guard.outputs.hit != 'true'
with:
Expand Down
Loading