Skip to content

CI: reclaim leftover docker images before Install packages installs - #113270

Merged
maxknv merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/install-packages-reclaim-docker-residue-pre-hook
Aug 7, 2026
Merged

maxknv merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/install-packages-reclaim-docker-residue-pre-hook

Conversation

@groeneai

@groeneai groeneai commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #113032

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Install packages (amd_release) failed on master sha 7039251dbe2db9b9f59c127ed1ec3ef3b1073183 with dpkg: ... No space left on device (report).

The job starts on a disk another job filled. The runner arrived 95% full (3.2 GiB free) while apt needs 4413 MB, so substep 1 of 18 was doomed. Measured over 12 master runs, the job is a net producer of free space (+3.0 to +4.6 GB each), so #111960, #112751 and #113032, all ancestors here, could not close it. The same exhaustion accounts for 15 runs in 20 days, 7 on master and 8 on release branches.

Install packages shares the style-checker pool with the Docker image builds and Compatibility check. Registering docker_clean_up_hook as a pre_hooks entry on both Install packages configs (4 parametrized jobs across PR, BackportPR, MasterCI, ReleaseBranchCI) reclaims that residue before installing.

The review then asked what still eats the disk. Compatibility check had no cleanup hook at all and loses 4 to 5 GB per run, so it gets the post hook. The Docker jobs do run the hook yet still lose 3 to 7 GB, reporting Total: 0B with zero images untagged, for two reasons reproduced locally on docker 29.5.1 / buildx v0.34.0: their docker-container buildx driver keeps its cache in its own buildkit container, which none of the hook's commands reaches (740.8 MB survived all four); and sort -k3,3M over an ISO {{.CreatedAt}} compares every date equal, so the keep-the-latest step kept an older image in 3 of 4 local repositories. Both fixes live in the shared hook, so the Docker jobs get them too. The runner also printed disk status after running a job before the post hooks ran, so those numbers excluded the cleanup.

No glob narrowed, no package skipped, no test touched. praktika does not propagate hook exit codes, so this stays best-effort.

Version info

  • Merged into: 26.8.1.938 (included in 26.8 and later)

Install packages (amd_release) failed on master sha 7039251 with

  dpkg: error processing archive clickhouse-common-static-dbg_26.8.1.673_amd64.deb
   cannot copy extracted data for './usr/lib/debug/usr/bin/clickhouse.debug' to
   '/usr/lib/debug/usr/bin/clickhouse.debug.dpkg-new': failed to write
   (No space left on device)

The runner arrived at 55G used / 3.2G available / 95% full, while apt announces
"After this operation, 4413 MB of additional disk space will be used". The first
of 18 substeps therefore could not succeed, and the outcome was settled before
the job wrote a byte.

The job's own footprint is not the variable. It is constant at +3-4 GiB across
green and failing runs alike, which is why the three merged fixes in this area
(ClickHouse#111960 synchronous per-substep docker rm, ClickHouse#112751 stop installing dbg in most
tests, ClickHouse#113032 binary tests last plus a non-interactive docker system prune) did
not close it: all three shrink or reorder that constant footprint. All three are
ancestors of this failing build.

What discriminates green from red is the state the runner starts in:

  FAIL  7039251 amd  i-0969e2fde61d860b0  55G used / 3.2G avail / 95%  1/18 fail
  GREEN 2251e69 amd  i-0b4dbf6ffb28c656e  24G used /  34G avail / 42%  18/18 ok
  GREEN 2251e69 arm  i-08f529e20e7f4090e  18G used /  41G avail / 31%  18/18 ok

CIDB shows the same start-state exhaustion in 15 Install packages runs over the
last 20 days, 7 on master and 8 on release branches (26.5 four, 26.6 two, 26.3
and 26.4 one each). Only 2 of the 15 carry this dpkg signature; the other 13
raise earlier, in the tgz substep, where docker run cannot allocate and exits
125, in 9 of the 13 while creating a containerd overlayfs snapshot dir and in
the other 4 at another daemon-side path under /var/lib/docker or /tmp. All 13
are exit 125 and all 13 are ENOSPC in the same substep, so the start-state class
is the same regardless of which allocation happens to be the one that fails.
Those 13 abort the job before any test row exists, so CIDB records them with an
empty test_name, which is why a breadth query keyed on the test name undercounts
the class. One of them, a61e6f1 on 26.3, ran on this same instance
i-0969e2fde61d860b0 54 minutes earlier, also one job after a Docker keeper image
run: same box, same residue, a different substep happening to be the one that
ran out.

Install packages runs on the style-checker pool, which also hosts the multi-arch
docker image builds. install_check.py pulls exactly two images, and the green
runner's post-hook deleted exactly those two; the failing runner's post-hook
deleted eight tags, six of which this job never pulled: five
clickhouse/clickhouse-keeper:head-* tags, including arm64 ones on an amd runner,
plus a stale install-deb-test tag.

That residue has an identified producer. Joining on the CIDB instance_id, the
job immediately before the failure on the same box is Docker keeper image for
BackportPR ClickHouse#112982 (sha 934bc90, branch backport/25.8/108977), 14:33:46 to
14:38:30, with the install job starting at 14:45:21 and nothing in between. It
ran in the non-push flavour (EVENT_TYPE='pull_request'), so its six builds used
--output=type=docker and tagged every arch in the local image store, whereas a
master-flavour run pushes by digest and creates no local arch tag. Its own
post-hook removed exactly one of those six tags; the five survivors are the same
five keeper tags the install job deleted 15 minutes later, and two of the image
IDs it reported as "unable to delete (must be forced) - image is referenced in
multiple repositories" before exiting 123 are among the IDs the install job then
removed.

The reason it left them is a hook version skew. At the producer's sha the cleanup
hook has no forced pass at all, only builder prune, container prune and an
unforced docker rmi. The forced pass over clickhouse/clickhouse- and
clickhouse/install- images was added by ba64179, which is an ancestor of
this failing master build but is not on the 25.8 line. Multi-arch head-* images
share layers and so are referenced in multiple repositories, which is exactly
what an unforced rmi refuses to remove.

docker_clean_up_hook was registered only as post_hooks, so on the consumer side
it frees that residue after the failure.

Register the same hook as a pre_hooks entry as well, on both Install packages
configs. That covers 4 parametrized jobs (amd and arm) across the PR, BackportPR,
MasterCI and ReleaseBranchCI workflows, 8 job objects in total, each verified
pre=1 post=1. Fixing the producer instead would mean backporting the newer hook to
every release and backport branch still in flight, whereas defending at the
consumer covers residue from any producer running any hook version. Nothing is
narrowed or skipped: no glob, no package, no test, no assertion. Re-pulling the
two install images costs seconds against a 900 s timeout: the measured deb+rpm
totals in the three captured logs are 4 s, 12 s and 9 s.

The reclaim is best-effort, deliberately. The hook ignores every Shell.check
return and returns True; runner.py builds the pre-hook result but never feeds it
into the flag gating the run, and appends it after the parent status was already
computed. Adding strict=True was rejected: the hook is shared by four other
post_hooks registrations, so failing closed would newly break unrelated checks on
a cleanup hiccup, and gating a run on pre-hooks is a praktika-wide contract
change. If the reclaim frees nothing the outcome is today's, never worse.

Note that pre_hooks is not among the fields dropped from the job digest, so the
config digest changes and the first run after merge is uncached instead of served
from cache. That is intended: a result cached without the pre-hook should not
satisfy the new config.

There is no local reproducer, since the trigger is another job's leftover disk
state on a shared runner, and a green run on this change proves nothing because
it requires drawing a dirty runner. Validation is mechanical: pre_hooks verified
non-empty on all four jobs, praktika yaml regenerating no workflow YAML, and the
hook exiting 0 both on a clean store and on one seeded with the observed residue,
which it removes while leaving unrelated images untouched.
@groeneai

groeneai commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (click to expand)

An independent reviewer read the change cold (without the author's evidence notes), then a
second model re-reviewed the frozen contract. Five review rounds ran before this was
published; the source diff has been unchanged at 6 lines since round 1, and every round
after that closed a precision defect in the maintainer-facing text rather than in the code.

# Finding Verdict
⚠️ The 15-run failure class was described as failing "in the tgz substep, where docker run cannot create a containerd snapshot dir" for all 13 non-dpkg runs. Only 9 of the 13 carry that error; the other 4 are different daemon-side ENOSPC sites in the same substep (/tmp/containerd-mount*, /var/lib/docker/volumes/...). ❌ AGREE, fixed. The description now claims only what is true of all 13 (docker run exits 125, not dpkg). The commit message states the 9/4 split explicitly with the outlier paths. All 13 are exit 125, all 13 are ENOSPC, all 13 are in test_install_tgz, so the start-state thesis is unaffected.
💡 The re-pull cost was given as 3-4 s, derived from the failing run only; the three captured logs measure 4 s, 12 s and 9 s. ❌ AGREE, fixed. The description says "seconds"; the precise per-log totals are recorded internally. Against a 900 s timeout the argument is unchanged.
💡 The commit message says a green runner's post-hook "deleted exactly those two" images. True of the amd green run; the arm green run also deleted clickhouse/clickhouse-server:26.5. ✅ DISAGREE. The sentence's scope is the amd-vs-amd comparison the failing run belongs to, and the internal citation is amd-specific. The arm datum points the same way: that third tag is not one install_check.py pulls either, so that box carried foreign residue too.
⚠️ An earlier draft justified the absence of a config-assertion test by claiming the repo has no harness for asserting hook registration. ❌ AGREE, fixed. That was factually wrong (ci/tests/test_bugfix_validation_not_cached.py asserts job-config properties, and ci/tests/ runs as the CI Tests job). The absence is now stated as what it is: a scope choice for a registration whose effect is a property of the runner environment.
💡 The plan predicted the job digest would not change, since digest_config lists only two paths. ❌ AGREE, corrected. A praktika job digest is <file_digest>-<config_digest>, and pre_hooks is not in digest.py's drop_fields, so the config half does change: the first run after merge is uncached rather than served from cache. That is the intended outcome, and it is stated in the description.
✅ Best-effort claim: is "praktika does not propagate a hook's exit code to the job status" accurate, or is the fix silently fail-open where it claims to be fail-closed? Verified on three independent legs. The hook ignores every Shell.check return and returns True; runner.py builds the pre-hook result but never feeds it into the flag gating the run; and the child result is appended after the parent status was already computed, so nothing re-aggregates. The change is described as best-effort because it is one. strict=True was deliberately not added: the hook is shared by four other post_hooks registrations.
✅ Are all carriers covered? Yes, enumerated independently. Both Install packages configs, giving 4 parametrized jobs (amd + arm) across the PR, BackportPR, MasterCI and ReleaseBranchCI workflows, 8 job objects, each verified pre=1 post=1. MergeQueueCI has no such job.

Final Gate B re-review of the frozen contract returned 0 findings, with coverage over
both changed job configurations, all four workflow consumers and their parametrizations,
the runner hook lifecycle, cache and YAML resolution, the cleanup hook, the install job,
the sibling cleanup configurations and the existing relevant tests.

Session id: cron:clickhouse-review-slot-48:20260804-082700

@groeneai

groeneai commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? No, and not possible locally - the trigger is another job's leftover disk state on a shared CI runner. The failing run itself is deterministic though: apt announces 4413 MB needed against 3.2 GiB available, so substep 1 of 18 could not succeed. Evidence is the measured job logs, not a hypothesis.
b Root cause explained? Yes. Install packages runs on the reused style-checker pool that also builds the multi-arch docker images; in their non-push (pull-request) flavour those builds use --output=type=docker and tag every arch locally, leaving clickhouse/clickhouse-keeper:head-<arch> behind, and docker_clean_up_hook was registered only as post_hooks, so the residue is reclaimed after this job has already hit ENOSPC.
c Fix matches root cause? Yes. The cause is "starts too full", and this is the only change that alters the start state. Not a widened bound, a skipped package, a relaxed assertion, or a bigger disk. The three merged PRs in this area (#111960, #112751, #113032) all shrink the job's own footprint, which is measurably constant at +3-4 GiB in green and failing runs alike. The class is 15 runs in the last 20 days, 7 on master and 8 on release branches, and 13 of them fail earlier still, at the tgz substep, where docker run cannot allocate and exits 125, most often failing to create a containerd overlayfs snapshot dir.
d Test intent preserved / new tests added? Preserved: all 18 substeps unchanged, no test file touched, no package-list or glob edit. No new test - this is a job-config registration whose effect is a property of the runner environment; validation is the three mechanical checks in (e).
e Both directions demonstrated? For the hook mechanism, yes: against an isolated docker daemon it exits 0 on a clean store (no-op, Total reclaimed space: 0B) and 0 on a store seeded with the three residue tags observed on the failing runner, removing all three while an unrelated image survives as a negative control. End-to-end, no: that needs a runner drawn in a dirty state, roughly 1 run in a few hundred. A green run on this PR would prove nothing and is not claimed as validation.
f Fix is general across code paths? Yes: both Install packages definitions are fixed, covering 4 parametrized jobs (amd + arm) across the PR, BackportPR, MasterCI and ReleaseBranchCI workflows - 8 job objects in total, verified by loading all four workflow modules and asserting pre_hooks is non-empty on each. Deliberately out of scope: compatibility_check_jobs (same pool but only small base images with a volume-mounted binary, no ENOSPC history) and the residue producers docker_server / docker_keeper. The producing run here is identified: a non-push Docker keeper image run for a 25.8 backport, on the same instance 7 minutes earlier, whose own cleanup hook predates the forced-removal pass on master and so failed with exit code: 123 on layer-shared multi-arch images. Fixing that producer would need the newer hook backported to every release and backport branch still in flight, while a consumer-side pre-hook covers residue from any producer running any hook version, which is why the producers need no change here.
g Fix generalizes across inputs (params/datatypes/wrappers)? N/A in the datatype sense (CI job config, no data path). The relevant matrix is covered: both arches, both workflow flavours, and both docker-store states (clean and dirty) exercised.
h Backward compatible? Yes - no setting, no serialization format, no user-visible behavior, so no SettingsChangesHistory.cpp entry. One CI-side effect worth stating: pre_hooks is not among the digest's dropped fields, so the job's config digest changes and the first run after merge is uncached rather than served from cache. That is the correct outcome, since a result cached without the pre-hook should not satisfy the new config.
i Invariants and contracts preserved? Yes, and the best-effort contract is deliberate rather than accidental: the hook ignores every Shell.check return and returns True; runner.py builds the pre-hook result but never feeds it into the flag that gates the run; and the child result is appended after the parent status was already computed, so appending does not re-aggregate. This fix is therefore not fail-closed and is not described as such. strict=True was deliberately not added - the hook is shared by four other post_hooks registrations, so making it fail-closed would newly fail unrelated checks on a cleanup hiccup, and gating a run on pre-hooks is a praktika-wide contract change (a separate concern). If the reclaim frees nothing, the outcome is today's, never worse.

Session id: cron:clickhouse-impl-slot-47:20260804-005700

@groeneai

groeneai commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

cc @maxknv, could you review this? docker_clean_up_hook was registered only as post_hooks on Install packages, so leftover multi-arch images from an earlier job on the same style-checker runner are reclaimed after this job has already hit ENOSPC; this registers the same hook as a pre_hooks entry too.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Aug 4, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [47b27da]

Summary: ✅


AI Review

Summary

This PR extends docker_clean_up_hook.py so Install packages reclaims disk before running, Compatibility check reclaims disk afterwards, the shared hook also prunes per-builder buildx cache, and runner.py prints disk usage after post-hooks. The Install packages digest gap from the earlier thread is fixed, but one material consistency issue remains: the shared cleanup hook still is not digested by every job whose behavior now depends on it.

Findings

⚠️ Majors

  • [ci/defs/job_configs.py:1303] Compatibility check now relies on docker_clean_up_hook.py, and this PR also changes that shared hook for Docker server image / Docker keeper image, but only Install packages digests the hook file. On the current head, job.is_affected_by(["ci/jobs/scripts/job_hooks/docker_clean_up_hook.py"]) is still False for both Compatibility check variants and for docker_server / docker_keeper, so a hook-only follow-up can be filtered out or cache-hit for the very jobs whose cleanup behavior changed. Suggested fix: add ./ci/jobs/scripts/job_hooks/docker_clean_up_hook.py to digest_config.include_paths for compatibility_test_jobs, docker_server, and docker_keeper.
Final Verdict

Changes needed: digest docker_clean_up_hook.py everywhere this shared cleanup logic is behavior-bearing, not only on Install packages.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 4, 2026
Comment thread ci/defs/job_configs.py Resolved
The pre-hook this PR adds makes docker_clean_up_hook.py decide whether the
runner has enough free disk before apt unpacks ~4.4 GB, so the script is now
part of the job's behaviour rather than post-job hygiene only. The jobs'
digest_config did not include it, so a change confined to the hook left
is_affected_by() False for all four parametrized Install packages jobs and left
the cache key unchanged: the job could be filtered out of a PR, or a cached
green result reused, while the reclaim logic had changed.

Measured before and after with a positive control on the include_paths half of
Digest.calc_job_digest. Without the entry the digest is 5684fd678d80 both with
a pristine hook and with the hook edited (3 files in the digest set, hook
absent). With the entry the digest is 16be4c33999d pristine and cf0a65c9fea5
with the same edit, returning to 16be4c33999d when the edit is reverted (4
files, hook present). is_affected_by(["ci/jobs/scripts/job_hooks/
docker_clean_up_hook.py"]) flips False to True on all eight job instances
across MasterCI, PR, BackportPR and ReleaseBranchCI.

Two Job.Config entries are edited (install_check_jobs and
install_check_master_jobs), which is four parametrized job objects and eight
job instances; the amd_release and arm_release variants of each config share
one digest_config object, so no variant is missed. No existing include_paths
entry covered the script by prefix: the sets held only ./ci/jobs/
install_check.py and ./ci/docker/install.

The repository already digests hook scripts this way for jobs whose hooks are
behaviour-bearing: build_profile_hook.py in the build digest config,
promql_compliance_hook.py in the integration-tests config, and
llvm_coverage_hook.py in the LLVM Coverage config. After this change no job in
any workflow names a pre-hook script its own digest does not cover.

One consequence is intended: because Digest.calc_job_digest does not drop
digest_config from the config half of the key, the first post-merge run of
these jobs is uncached.
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Aug 4, 2026
@maxknv

maxknv commented Aug 6, 2026

Copy link
Copy Markdown
Member

@groeneai

  1. Let's print disk status after running a job after post hooks
  2. Add the post hook with clean-up to the Docker server/keeper job configs
  3. Figure out what eats disk in the Install check job. Available disk space consistently decreases after each run, despite the post-hook.
  4. Enhance the clean-up if needed and use it in both Install and Docker jobs

@maxknv
maxknv self-requested a review August 6, 2026 10:20
@maxknv maxknv self-assigned this Aug 6, 2026
Follow-up to the review on this PR, which asked what keeps eating disk on the
style-checker runners despite the cleanup post hook. Measured over 12 master
`Install packages (amd_release)` runs: the job itself is a net producer of free
space, ending every run with 3.0 to 4.6 GB more available than it started. The
decrease happens between runs, and two co-tenants of that runner pool cause it.

`Compatibility check` shares the pool and had no cleanup hook at all, losing 4
to 5 GB per run over the 5 runs measured. Register the existing hook on it.

The Docker image jobs already run the hook, yet still lose 3 to 7 GB per run and
their hook reports `Total: 0B` with zero images untagged. Two reasons, both
reproduced locally with docker 29.5.1 and buildx v0.34.0:

- The image builds use the `docker-container` buildx driver, whose cache lives
  in its own buildkit container. Neither `docker builder prune` on the default
  builder nor `docker system prune` can reach it, and the buildkit image does
  not match the hook's `clickhouse/` removal pattern. A fixture holding 740.8 MB
  survived all four of the hook's commands untouched; pruning per builder
  reclaims it. `buildx ls` is parsed rather than `ls --format json` so the
  enumeration does not depend on a recent buildx.
- `sort -k3,3M` was applied to `{{.CreatedAt}}`, which is an ISO date, so every
  date compared equal and the order fell through to `-k4,4n`, the hour alone.
  On the local image list 3 of 4 repositories with more than one tag kept an
  older image and deleted the newest, so the next job re-pulls what was just
  evicted. `Jan 1 23:00` really does sort after `Dec 31 09:00` under that key.
  The selection now names `Repository:Tag`, because `docker rmi <id>` without
  `-f` refuses an id that several repositories still tag, which left such an
  image and its layers behind.

Finally, `disk status after running a job` was printed inside `_run`, which
returns before the post hooks execute, so the reported numbers never included
the cleanup. In every Docker job log the last `df` precedes the post-hooks
section. Move the print to the end of `run` so it describes the disk the next
job actually inherits; it stays outside `if run_hooks` and ahead of the exit, so
it is reached on success and on failure alike.

The cleanup hook is shared with the Docker server and keeper jobs, so both fixes
reach them as well; that is the intent, since they are the measured consumers.
@groeneai

groeneai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@maxknv thanks. Item 3 turned out to be the interesting one, so I measured it first and the answer changed what items 2 and 4 needed. Pushed as 47b27dacaf28b27a948051c4c2e55da019f4a2cb.

1. Print after the post hooks. Done. disk status after running a job was printed inside _run (runner.py:528), which returns before the post hooks run at :1125, so the numbers never included the cleanup. In every Docker keeper image log the last df line precedes the === Post hooks marker (946/956, 949/959, 946/956, 1166/1176). It is now at the end of run, outside if run_hooks and ahead of the exit, so it reports on success and on failure.

2. Post hook on the Docker server/keeper configs. Already there since 2026-01-06 (48eb86e8decab606), at job_configs.py:1540 and :1556, and it does execute: each Docker job log has a === Post hooks section running the hook. The problem is that it reclaims nothing, which is item 3.

3. What eats the disk. Not Install packages. Over the 12 master runs whose logs I could fetch it is a net producer of free space, ending every run with 3.0 to 4.6 GB more available than it started, 12 out of 12. The decrease is between runs: on i-07e5143aecaff5ab3 a run ended at 46G free and the next started at 33G; on i-07585790251076f39, 39G to 35G.

Two co-tenants of the style-checker pool account for it:

  • Compatibility check has no cleanup hook at all and loses 4 to 5 GB per run (5 runs measured, 5 net-negative, zero Post hooks sections in the logs).
  • The Docker image jobs run the hook and still lose 3 to 7 GB, with Total: 0B reclaimed and 0 images untagged. Two reasons, both reproduced locally on docker 29.5.1 / buildx v0.34.0:
    • They build with the docker-container buildx driver (#0 building with "default-builder" instance using docker-container driver in every log), whose cache lives in its own buildkit container. A fixture holding 740.8 MB survived all four of the hook's commands: docker builder prune -a -f reported Total: 0B, docker container prune -f could not touch a running buildkit container, docker system prune -f reported 0B, and moby/buildkit does not match the ^clickhouse/(clickhouse|install)- removal pattern. Pruning per builder reclaims it.
    • sort -k3,3M was applied to {{.CreatedAt}}, which is an ISO date, so every date compares equal and the order falls through to -k4,4n, the hour alone: printf 'r x 2026-01-01 23:00:00 ...\nr y 2026-12-31 09:00:00 ...' | sort -k3,3M -k4,4n -k5,5n puts Jan 1 after Dec 31. On the local image list, 3 of 4 repositories with more than one tag kept an older image and deleted the newest, so the next job re-pulls what was just evicted.

Separately, the clickhouse-common-static-dbg deb has grown 1226 -> 1231 -> 1245 MB across the three failing shas, so the margin shrinks on its own regardless of cleanup.

4. Enhanced and applied to both. The cleanup is shared, so both fixes reach the Docker jobs automatically; Compatibility check gets the post hook registered. The buildx prune iterates builders because prune has no --all-builders; enumeration parses plain buildx ls rather than ls --format json so it does not depend on a recent buildx, and a builder that has never built (no container yet) is tolerated. Verified with two docker-container builders plus one inactive: 269 MB and 2.734 GB reclaimed to 0B, the inactive one skipped, exit 0. The image selection now names Repository:Tag instead of the id, because docker rmi <id> without -f refuses an id several repositories still tag and left such an image behind; measured on a fixture with a shared-id alias, the id form errors and the reference form untags cleanly while still deleting layers when the id is unique.

One thing I did not do: jepsen_keeper, jepsen_server and update_toolchain_dockerfile_job are also on this pool with no cleanup. I have no disk measurements for them, so I left them alone rather than guess. Happy to add the hook there too if you want it.

@maxknv
maxknv enabled auto-merge August 7, 2026 07:46
Comment thread ci/defs/job_configs.py Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 47b27daca with master 7a9ada8cf (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of f845f92bc; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 689.45 MiB 686.34 MiB -3.12 MiB (-0.45%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.

Job report

@maxknv
maxknv added this pull request to the merge queue Aug 7, 2026
Merged via the queue into ClickHouse:master with commit a911cc4 Aug 7, 2026
180 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 7, 2026
@groeneai groeneai added the groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding manual approve Manual approve required to run CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants