Repository navigation
Remove the circular dependency between clickhouse/cctools and clickhouse/fasttest - #126309
Conversation
…/fasttest` `clickhouse/fasttest` and other images copy `/opt/gdb` and `/opt/openssl-fips` from `clickhouse/cctools`, while `clickhouse/cctools` itself was built from `clickhouse/fasttest`. Because of this cycle, the pinned `cctools` tag in the dependent images never matched its digest, and bumping the tag changed the `cctools` digest again. Nothing in the build needs the `fasttest` toolchain: libtapi and cctools-port build with any recent clang, gdb and OpenSSL with any C/C++ compiler. Build it from the plain `ubuntu:24.04` (the same base as `fasttest`, so the copied binaries match its glibc) with the Ubuntu clang. The `ld.lld` workaround for binutils 2.38 is not needed with binutils 2.42 from Ubuntu 24.04. Related: #124241 Related: #126291 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [a21b464] Summary: ✅
AI ReviewSummaryThe PR removes the circular dependency between Final VerdictStatus: ✅ Approve |
The first dependency is still the base image, passed as `FROM_TAG`. The tag of every dependency is also passed as a `<NAME>_TAG` build argument (e.g. `CCTOOLS_TAG` for `clickhouse/cctools`), so an image can copy files from another image by its calculated digest instead of a pinned tag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The images that copy files from `clickhouse/cctools` declared the tag in their Dockerfiles, and it had to be updated by hand in a separate commit after the image was built. It was forgotten after the gdb update. Make `clickhouse/cctools` a dependency of these images and take its tag from the `CCTOOLS_TAG` build argument. A change in `cctools` now rebuilds the dependent images automatically. The server and keeper images get the tag from the workflow config. Related: #124241 Related: #126291 Co-Authored-By: Claude Opus 5.5 <[email protected]>
clickhouse/cctools from ubuntu:24.04 instead of clickhouse/fasttestclickhouse/cctools and clickhouse/fasttest
An image built without the tag would silently get whatever `latest` points to. Require the tag to be passed explicitly instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An `ARG` placed after a `FROM` is scoped to that build stage, so
`FROM_TAG` (and `REDPANDA_VERSION`) declared after the new
`FROM clickhouse/cctools:${CCTOOLS_TAG} AS cctools` line were empty in
the following `FROM` instructions:
failed to parse stage name "clickhouse/test-base:": invalid reference format
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126309&sha=5af22566bb50337ec344b8111f9773a0c509effe&name_0=PR&name_1=Dockers%20Build%20%28amd%29
#126309
Co-Authored-By: Claude Opus 5.5 <[email protected]>
leshikus
left a comment
There was a problem hiding this comment.
Please double check --build-arg added at docker_server.py:513 is really needed by the build, otherwise looks good
None of the `docker/server` and `docker/keeper` Dockerfiles copy from `clickhouse/cctools`, so the build arg was unused. #126309 (review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes2 object files changed (+5.18 KiB total), 2 added.
721 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
…rence build The praktika job digest does not include the Docker image digest when `run_in_docker` contains a colon, and `BINARY_DOCKER_COMMAND` does (`--volume=.:/ClickHouse`). A `clickhouse/binary-builder` change (compiler, PGO or BOLT profile) therefore leaves the sources digest of the reference build unchanged, as at ClickHouse#126309: `566499c799d454cd6e24` both at 2a95d09 (image 3480c0dc11) and at b1451e4 (image c815e89709). MasterCI schedules the reference build after such a change, so the old lookup stopped there, while matching by sources digest alone could take a reference built with the previous image whenever the new one is still running or failed. Compare `digest_dockers["clickhouse/binary-builder"]` of both MasterCI workflow configs as well; a missing image digest keeps the official build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Remove the circular dependency between
clickhouse/cctoolsandclickhouse/fasttest, and stop pinning thecctoolstag by hand.clickhouse/fasttestand other images copy/opt/gdband/opt/openssl-fipsfromclickhouse/cctools, whileclickhouse/cctoolsitself was built fromclickhouse/fasttest. Because of this cycle, the pinnedcctoolstag in the dependent images could never match its digest, every tag bump changed thecctoolsdigest again, and after the gdb update the tag was not bumped at all.clickhouse/cctoolsfromubuntu:24.04with the Ubuntu clang. Nothing in it needs thefasttesttoolchain. It is the same base asfasttest, so the copied binaries match its glibc. Theld.lldworkaround for binutils 2.38 is dropped, as Ubuntu 24.04 ships binutils 2.42.FROM_TAG; every dependency is also passed as<NAME>_TAG, e.g.CCTOOLS_TAG.clickhouse/cctoolsa dependency of the images that copy from it, and take its tag fromCCTOOLS_TAGinstead of a pinned one. A change incctoolsnow rebuilds the dependent images automatically. The server and keeper images get the tag from the workflow config.Related: #124241
Related: #126291
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/126309]
Version info
26.11.1.313-master(included in26.11and later)