Repository navigation
Run only shell-free tests for distroless images in the docker library check (25.8) - #119552
Merged
Merged
Conversation
… check (25.8) Since #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` (#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]>
Contributor
|
Workflow [BackportPR], commit [fd58531] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #119492 swapped the 25.8 distroless base image to
gcr.io/distroless/base-nossl-debian13, the distroless images have no shell and no coreutils, but thedocker library image testinDocker server imagestill runs thedocker-library/official-imagesglobal tests against them:So the job is red on every pull request targeting 25.8 and on the 25.8 release-branch CI itself. This is the 25.8 counterpart of #119532 (26.3) and #119533 (26.4), but it needs a differently shaped fix:
tests/ci/docker_server.py, which invokesrun.shwithout-cat all, soci/jobs/scripts/docker_server/config.sh— the file Run only shell-free tests for distroless images in the docker library check (26.3) #119532 patches — is dead code here.ci/jobs/scripts/docker_server/tests/lib.shand noclickhouse-basicstest, soclickhouse-distroless-no-shellis the only repository test that can run on this branch.For distroless images
test_docker_librarynow generates a small config fragment next toci/jobs/scripts/docker_server/tests/and passes it alongside the upstream config. The fragment marks the image variant asexplicitTests— which is what keeps the global tests away — and maps it toclickhouse-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 becauserun.shderives the lookup variant from the last tag component, lookingclickhouse/clickhouse-server:head-distroless-amd64up asclickhouse/clickhouse-server:amd64.Verified against a fresh clone of
docker-library/official-imageswith the test selection printed instead of executed: without the change the distroless server image selectsutc no-hard-coded-passwords override-cmd(exactly the three tests of the failing CI run), with it onlyclickhouse-distroless-no-shell, and as a control the same fragment with theexplicitTestsentry removed brings the three global tests back. Selection for non-distroless tags is unchanged. @groeneai diagnosed the 25.8-specific shape of this and validated the same patch end to end against the real official-images suite usinggcr.io/distroless/base-nossl-debian13, on both amd64 and arm64 — thank you.One deliberate omission: to give 25.8 the same coverage as 26.3 rather than only making it green,
tests/lib.shand theclickhouse-distroless-initdbentry have to be backported too. That is left out here to keep the fix minimal.Related: #119500, #119532, #119533
Changelog category (leave one):
Documentation entry for user-facing changes
🤖 Generated with Claude Code
Version info
25.8.34.13