Repository navigation
[tests] Start the test containers without a shell (ClickHouse 26.12 default image) - #3443
Open
polyglotAI-bot wants to merge 1 commit into
Open
polyglotAI-bot wants to merge 1 commit into
polyglotAI-bot wants to merge 1 commit into
Conversation
From ClickHouse 26.12 (ClickHouse/ClickHouse#129069), the default clickhouse/clickhouse-server image is built FROM scratch: it has no /bin/sh, coreutils or /entrypoint.sh, and its entrypoint is `clickhouse docker-init`. The test harness set the entrypoint to /bin/sh to run the bash script containers/clickhouse-server/patch, and started Keeper with `sh -c "mkdir ... && exec clickhouse-keeper"`, so no container started with the `head` image. - Copy the server configuration straight into /etc/clickhouse-server and keep the entrypoint of the image. A copy merges with the files of the image, as the `cp` of the script did. Remove the script. - Start Keeper as `/usr/bin/clickhouse keeper`. Keeper creates its log and snapshot directories itself. - CONTRIBUTING.md: TEST_CLICKHOUSE_ADDITIONAL_PACKAGES needs an image with apt-get (a `-ubuntu` tag from 26.12). Fixes: #3441 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Auto-approved by the AI review gate on 3db6148. Details in the approver's comment on this pull request.
AI review gate — auto-approved
History (latest 5 heads, newest first)
|
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
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.
Summary
Closes #3441
The integration tests can start the server again with the default
clickhouse/clickhouse-serverimage of ClickHouse 26.12 and later (nowhead, laterlatest). ClickHouse/ClickHouse#129069 builds that imageFROM scratch: it has no/bin/sh, coreutils or/entrypoint.sh. The harness set the entrypoint to/bin/shto run the bash scriptcontainers/clickhouse-server/patch(ClickHouseContainerStarter.java:127), and started Keeper withsh -c "mkdir ... && exec clickhouse-keeper", so no container started.clickhouse docker-init, or/entrypoint.shin the Ubuntu images). The configuration (config.d,users.d,certs) is copied straight into/etc/clickhouse-serverwithwithCopyFileToContainer. A copy merges with the files of the image (config.d/docker_related_config.xmlstays), as thecpof the script did. The cluster overrides are copied after it, in the same order as before. Thepatchscript is removed./usr/bin/clickhouse keeper --config-file=.... Keeper creates its log and snapshot directories itself, so themkdiris not necessary.chown clickhouse:clickhouseoncertsand ignored a failure. Not needed: the copied files are world-readable, and TLS works on both kinds of image.TEST_CLICKHOUSE_ADDITIONAL_PACKAGESstill runsapt-get, which needs an image with a shell.CONTRIBUTING.mdnow says to use a-ubuntutag for it.Compatibility
Test code and
CONTRIBUTING.mdonly. No change to the published modules.Test
head(26.12): run 45841074616. Thejdbc-v2job can still fail onStatementSQLTest.testAllowedKeywordAliasesMatchSystemKeywords, a separate issue ([jdbc-v2] Keyword test fails on CH 26.11 (SEGMENTS, SHARDS); ANTLR4 grammar does not acceptshardsas an identifier #3428).latest), in single and cluster mode.head(26.12.1.582),head-ubuntu(26.12.1.581) and 25.8. Remote HTTP asdefaultwith the test password, HTTPS on 8443,TZ, the custom cluster configuration and Keeper all worked. With the old/bin/shentrypoint,headexits with code 127.Checklist
docs/changes_checklist.md: no section applies (test harness only)Appended by Polyglot AI, 2026-11-26 14:55 UTC: run 45841074616 on
head(26.12, scratch image) started the containers in all five jobs.client-v2,clickhouse-jdbc,clickhouse-http-clientand R2DBC pass.jdbc-v2runs 809 integration tests with one failure,testAllowedKeywordAliasesMatchSystemKeywords(#3428), as onmainbefore the image change.Appended by Polyglot AI, 2026-11-26 15:50 UTC: the red PR checks are not from this change. "JDBC driver + CH latest" and "jdbc-v2 + CH cluster latest" fail only on the keyword test of #3428. "client-v2 + CH cluster latest" timed out, and its re-run failed on
RowBinaryTest.testGetObjectArray1Dafter 120 s: the cluster insert stall of #3246, which fails the same test on other branches with the old harness (run 45840670527). All cluster jobs started their containers; on 25.8, 26.3 and 26.8 they pass.🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to test harness code and contributor docs; published client libraries are untouched.
Overview
Integration tests no longer override the image entrypoint with
/bin/shor run the removedcontainers/clickhouse-server/patchscript. Server test config is copied straight into/etc/clickhouse-serverviawithCopyFileToContainer, preserving the image’s normal startup (including ClickHouse 26.12+ scratch images with no shell).Cluster Keeper is started as
/usr/bin/clickhouse keeperwith a config file instead of a shell one-liner that created coordination directories.CONTRIBUTING.mdnotes thatTEST_CLICKHOUSE_ADDITIONAL_PACKAGESstill needs anapt-get-capable image (e.g.-ubuntutags from 26.12 onward).Reviewed by Cursor Bugbot for commit 3db6148. Bugbot is set up for automated code reviews on this repo. Configure here.