Repository navigation
Enable Kafka integration tests on arm64 - #103248
Merged
Merged
Conversation
The `tests/integration/test_storage_kafka` suite was previously `pytest.mark.skip`-ed on ARM because `confluentinc/cp-kafka:5.2.0`, `confluentinc/cp-schema-registry:5.2.0` and `zookeeper:3.4.9` are all x86_64-only images and could not even start on an arm64 host. Bump the images used in `docker_compose_kafka.yml` to multi-arch variants (`confluentinc/cp-kafka:7.9.0`, `confluentinc/cp-schema-registry:7.9.0`, `zookeeper:3.8`) when the current host is arm64, and remove the unconditional skip. On amd64 the defaults keep the exact image tags that were used before, so the tests that pass today should not be affected. Starting from `zookeeper:3.5` the `clientPort` is no longer defaulted to `2181`, it has to be provided via the `;<port>` suffix in `ZOO_SERVERS`, so the server list is also overridden on arm64.
1 task done
Contributor
|
Workflow [PR], commit [875de9d] Summary: ✅ AI ReviewSummaryThis PR enables Kafka integration tests on arm64 by switching the Kafka/ZooKeeper/Schema Registry images to arm64-compatible tags on ARM hosts, removing the ARM skip in Kafka integration helpers, and making small test-tag/robustness adjustments in stateless tests. I did not find new correctness, safety, performance, or compatibility issues that require changes. ClickHouse Rules
Final Verdict
|
Under LLVM coverage instrumentation, a handful of stateless tests consistently time out (server is slow enough that `SYSTEM FLUSH LOGS` hits the 180 s limit, or client-side curl/socket timeouts trip). Tag them with `no-llvm-coverage` so they are skipped in that check. Tests affected: - `02818_memory_profiler_sample_min_max_allocation_size` - `02992_all_columns_should_have_comment` - `02293_http_header_full_summary_without_progress` - `03150_trace_log_add_build_id` - `04078_native_protocol_input_validation` CI report: #103248 (comment) PR: #103248
The test used to fully parse the server's response to each query, trying to walk every packet (Progress, ProfileInfo, Data, ProfileEvents, …) until EndOfStream. That parsing was fragile: * the revision guards for extra `Progress` fields were wrong (written rows/bytes are gated by `DBMS_MIN_REVISION_WITH_CLIENT_WRITE_INFO` = 54420, not 54372; the one varuint read under "CLIENT_REVISION >= 54448" does not correspond to anything the server actually sends at revision 54449), and * `skip_block` assumed a fixed 8 bytes per value for any column type it did not recognise, including `DateTime` (4 bytes) that is used in the `ProfileEvents` block. Either miscount silently misaligned the stream, and a later `read_string` would then try to UTF-8-decode a stray byte (seen in CI as ``'utf-8' codec can't decode byte 0x88 in position 0``). Whether this hit depended on which packets the server interleaved in a given run, so the test was flaking under the flaky check. All three validations under test — stage, query_kind, compression — are performed while parsing the `Query` packet inside `TCPHandler::receiveQuery`, so a rejection is always the first packet after `Hello`. Looking at only the first packet is therefore enough to distinguish "server accepted the query" from "server rejected it", and avoids reimplementing the rest of the wire format. Rewrite `get_response` accordingly and drop the now-unused `skip_block` helper and packet-type constants. Verified locally by running the test 200 times sequentially and in 5-way parallel batches against a local server — all runs pass. CI reports for the original failures: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103248&sha=36decd61da30dfb987385b90fb346ce6b07731d0&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20flaky%20check%29 https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103248&sha=36decd61da30dfb987385b90fb346ce6b07731d0&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The previous implementation iterated over the string "arm, aarch" character-by-character, checking each single character against platform.processor().lower(). That never matched real arch names like "aarch64", so is_arm() was effectively dead on arm64 hosts. Switch to platform.machine() which reliably returns "arm64" on macOS Apple Silicon and "aarch64" on Linux arm64. Addresses review: #103248 (comment) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 task
Member
Author
|
Excellent! |
pull Bot
pushed a commit
to sonvt1710/ClickHouse
that referenced
this pull request
Apr 25, 2026
The previous implementation iterated over the string "arm, aarch" character-by-character, checking each single character against platform.processor().lower(). That never matched real arch names like "aarch64", so is_arm() was effectively dead on arm64 hosts. Switch to platform.machine() which reliably returns "arm64" on macOS Apple Silicon and "aarch64" on Linux arm64. Addresses review: ClickHouse#103248 (comment) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 task done
Member
|
Backporting to fix CI |
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.
The
tests/integration/test_storage_kafkasuite was previouslypytest.mark.skip-ed on ARM becauseconfluentinc/cp-kafka:5.2.0,confluentinc/cp-schema-registry:5.2.0andzookeeper:3.4.9are all x86_64-only images and could not even start on an arm64 host.Bump the images used in
docker_compose_kafka.ymlto multi-arch variants (confluentinc/cp-kafka:7.9.0,confluentinc/cp-schema-registry:7.9.0,zookeeper:3.8) when the current host is arm64, and remove the unconditional skip.On amd64 the defaults keep the exact image tags that were used before, so the tests that pass today should not be affected.
Starting from
zookeeper:3.5theclientPortis no longer defaulted to2181, it has to be provided via the;<port>suffix inZOO_SERVERS, so the server list is also overridden on arm64.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Enable Kafka integration tests on arm64.
Version info
26.5.1.76