Skip to content

Run only shell-free tests for distroless images in the docker library check (26.3) - #119532

Merged
alexey-milovidov merged 1 commit into
26.3from
fix/distroless-docker-library-tests-26.3
Sep 12, 2026
Merged

alexey-milovidov merged 1 commit into
26.3from
fix/distroless-docker-library-tests-26.3

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Since #119493 swapped the 26.3 distroless base image to gcr.io/distroless/base-nossl-debian13, the distroless images have no shell and no coreutils. The docker library image test in the Docker server image and Docker keeper image jobs still ran the docker-library/official-images global tests against them, so utc and no-hard-coded-passwords die with

docker: Error response from daemon: ... exec: "date": executable file not found in $PATH
docker: Error response from daemon: ... exec: "cut": executable file not found in $PATH

and both jobs are red on every pull request targeting 26.3 since 2026-09-11 16:22 UTC (for example #119500, and the 26.3 release-branch CI itself). master is unaffected because it already restricts the test set for distroless images; this change ports that fix to 26.3.

What it does:

  • ci/jobs/scripts/docker_server/config.sh gains distroless-safe test lists and marks the distroless image variants as explicitTests, so the runner does not add the global tests. The file is now byte-identical to master.
  • test_docker_library in ci/jobs/docker_server.py generates a small config fragment for the arch-suffixed local CI tags: the official-images runner derives clickhouse/clickhouse-server:head-distroless-amd64 as clickhouse/clickhouse-server:amd64, so the plain :distroless key alone never matches.

Verified locally against a fresh clone of docker-library/official-images, with the test selection printed instead of executed:

image before after
clickhouse-server:head-distroless-amd64 utc no-hard-coded-passwords override-cmd clickhouse-initdb-skip-user-setup clickhouse-override-tcp-port clickhouse-basics (exactly the 6 tests of the failing CI run) clickhouse-basics clickhouse-distroless-no-shell clickhouse-distroless-initdb
clickhouse-keeper:head-distroless-amd64 utc no-hard-coded-passwords override-cmd clickhouse-distroless-no-shell
clickhouse-server:head-amd64 (unchanged) 6 tests incl. globals same 6 tests

26.4 has the identical gap (same config.sh, same job script) and gets the same fix in #119533. 25.8 is red the same way, but its docker job still runs from the older tests/ci/docker_server.py, which does not use the repository config.sh at all, so it needs a separate, differently shaped fix.

Related: #119493
Related: #119492
Related: #119494

Changelog category (leave one):

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

🤖 Generated with Claude Code

Version info

  • Merged into: 26.3.33.58

… check

Since #119493 swapped the 26.3 distroless base to
`gcr.io/distroless/base-nossl-debian13`, the images have no shell and no
coreutils. The `docker library image test` in `Docker server image` and
`Docker keeper image` still ran the `docker-library/official-images`
global tests against them, so `utc` and `no-hard-coded-passwords` died
with `exec: "date": executable file not found in $PATH` and
`exec: "cut": executable file not found in $PATH`. That makes both jobs
red on every pull request targeting 26.3.

Port master's fix: `config.sh` gains distroless-safe test lists and marks
the distroless image variants as `explicitTests`, so the runner does not
add the global tests, and `test_docker_library` generates a small config
fragment that maps the arch-suffixed local CI tags (the runner derives
`clickhouse/clickhouse-server:head-distroless-amd64` as
`clickhouse/clickhouse-server:amd64`) to those lists.

Verified locally against a fresh clone of
`docker-library/official-images` with the test selection printed instead
of executed: before the change the server distroless image selected
`utc no-hard-coded-passwords override-cmd clickhouse-initdb-skip-user-setup clickhouse-override-tcp-port clickhouse-basics`
(exactly the 6 tests of the failing CI run) and the keeper one selected
`utc no-hard-coded-passwords override-cmd`; after it they select
`clickhouse-basics clickhouse-distroless-no-shell clickhouse-distroless-initdb`
and `clickhouse-distroless-no-shell`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [c75c45b]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Sep 11, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 12, 2026
@alexey-milovidov
alexey-milovidov merged commit b118f82 into 26.3 Sep 12, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix/distroless-docker-library-tests-26.3 branch September 12, 2026 08:30
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 18, 2026
… check (25.8)

Since ClickHouse#119492 swapped the 25.8 distroless base to
`gcr.io/distroless/base-nossl-debian13`, the images have no shell and no
coreutils, but `docker library image test` in `Docker server image` still
runs the `docker-library/official-images` global tests against them, so
`utc` fails with `exec: "date": executable file not found in $PATH` and
`no-hard-coded-passwords` with `exec: "cut": executable file not found in
$PATH`. That makes the job red on every pull request targeting 25.8 and on
the 25.8 release-branch CI itself.

26.3 and later are fixed by patching `ci/jobs/scripts/docker_server/config.sh`
(ClickHouse#119532), but that file is dead code on 25.8: the docker job here runs from
`tests/ci/docker_server.py`, which invokes `run.sh` without `-c` at all, so
only the official-images own `test/config.sh` is loaded. 25.8 also lacks
`ci/jobs/scripts/docker_server/tests/lib.sh` and the `clickhouse-basics` test,
so `clickhouse-distroless-no-shell` is the only repository test that can run
there.

So for distroless images `test_docker_library` now generates a small config
fragment next to `ci/jobs/scripts/docker_server/tests/` and passes it
alongside the upstream config. The fragment marks the image variant as
`explicitTests`, which is what keeps the global tests away, and maps it to
`clickhouse-distroless-no-shell`. The generated file is removed afterwards.
Non-distroless images keep the current code path unchanged.

The arch-suffixed local CI tags need that mapping because `run.sh` derives
the lookup variant from the last tag component: it looks
`clickhouse/clickhouse-server:head-distroless-amd64` up as
`clickhouse/clickhouse-server:amd64`.

Verified against a fresh clone of `docker-library/official-images` with the
test selection printed instead of executed: without the change the distroless
server image selects `utc no-hard-coded-passwords override-cmd` (exactly the
three tests of the failing CI run), with it only
`clickhouse-distroless-no-shell`, and as a control the same fragment with the
`explicitTests` entry removed brings the three global tests back. Selection
for non-distroless tags is unchanged.

Thanks to @groeneai, who diagnosed the 25.8-specific shape of this and
validated the same patch end to end against the real official-images suite
using `gcr.io/distroless/base-nossl-debian13`, on both amd64 and arm64.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant