v0.67.0 — Prune runner dind leftovers after e2e #143

Merged
kamilkrzywda merged 1 commits from ci/dind-prune into master 2026-09-23 20:21:48 +02:00
Owner

What accumulates on the runner between runs

The CI runner is full-dind: job and app containers share one daemon, which is also shared with production and other workflows (per the comment at the existing cleanup step). The current cleanup handles our stack (compose down -v), our network, and our DB volume — but three things still accumulate on that daemon between runs:

  • dangling images/layers from rebuilding flight-ops-ci every run
  • BuildKit cache (persists by design)
  • leaked job containers from interrupted runs (the start-of-run docker volume rm flight-ci_flight-db guard exists precisely because interrupted runs skip end-of-run cleanup)

What this PR does

Adds ONE step to .gitea/workflows/ci.yml, placed after the existing "Cleanup e2e stack + network" step:

- name: Prune runner dind leftovers
  if: always()
  run: docker system prune -af || echo "::warning::dind prune failed — see logs"

docker system prune -af reclaims exactly the three categories above (all unused images incl. tagged-but-unused, build cache, stopped containers).

Why -af without --volumes is the safe choice on a shared daemon

  • No --volumes: named volumes may hold other workflows' persistent data — the daemon is shared with production ("never leave our stack or network behind" applies to volumes too). This project's own flight-ci_flight-db volume is already dropped by the existing cleanup steps, so there is nothing of ours left for prune to touch.
  • Non-fatal: || echo "::warning::..." (same annotation style the workflow already uses) means a prune failure can never mask or break the run's real result — worst case we log a warning and leave the leftovers for the next run.
  • if: always(): runs even when tests fail, so failed runs don't leak their rebuild layers either.

Scope

No app/TS changes; no new env vars; existing steps untouched. CI validates the workflow itself (YAML parses clean locally). Version bumped to 0.67.0 with a CHANGELOG entry.

## What accumulates on the runner between runs The CI runner is full-dind: job and app containers share one daemon, which is also shared with production and other workflows (per the comment at the existing cleanup step). The current cleanup handles our stack (`compose down -v`), our network, and our DB volume — but three things still accumulate on that daemon between runs: - **dangling images/layers** from rebuilding `flight-ops-ci` every run - **BuildKit cache** (persists by design) - **leaked job containers** from interrupted runs (the start-of-run `docker volume rm flight-ci_flight-db` guard exists precisely because interrupted runs skip end-of-run cleanup) ## What this PR does Adds ONE step to `.gitea/workflows/ci.yml`, placed after the existing "Cleanup e2e stack + network" step: ```yaml - name: Prune runner dind leftovers if: always() run: docker system prune -af || echo "::warning::dind prune failed — see logs" ``` `docker system prune -af` reclaims exactly the three categories above (all unused images incl. tagged-but-unused, build cache, stopped containers). ## Why `-af` without `--volumes` is the safe choice on a shared daemon - **No `--volumes`:** named volumes may hold other workflows' persistent data — the daemon is shared with production ("never leave our stack or network behind" applies to volumes too). This project's own `flight-ci_flight-db` volume is already dropped by the existing cleanup steps, so there is nothing of ours left for prune to touch. - **Non-fatal:** `|| echo "::warning::..."` (same annotation style the workflow already uses) means a prune failure can never mask or break the run's real result — worst case we log a warning and leave the leftovers for the next run. - **`if: always()`:** runs even when tests fail, so failed runs don't leak their rebuild layers either. ## Scope No app/TS changes; no new env vars; existing steps untouched. CI validates the workflow itself (YAML parses clean locally). Version bumped to 0.67.0 with a CHANGELOG entry.
kamilkrzywda added 1 commit 2026-09-23 20:06:02 +02:00
v0.67.0: prune runner dind leftovers after e2e
CI / build + unit + e2e (pull_request) Successful in 15m40s
a56937cee2
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-23 20:08:41 +02:00
kamilkrzywda merged commit 65cbcf6e17 into master 2026-09-23 20:21:48 +02:00
Sign in to join this conversation.