Skip to content

Commit 9750558

Browse files
committed
[KYUUBI #6915] Fix ClickHouse integration tests
### Why are the changes needed? I observed ClickHouse integration test failure in GHA, after some investigation, the root cause is testcontainers/testcontainers-java#9942 ``` /entrypoint.sh: neither CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD is set, disabling network access for user 'default' ``` In short, the recent ClickHouse docker image does not allow the `default` user to connect without a password, unfortunately, `testcontainers-scala-clickhosue` does not expose API to set CLICKHOSUE_USER and CLICKHOUSE_PASSWORD, as a workaround, I pin `clickhouse-server:24.3.15`(the latest version has no such restriction) until a fixed version of Testcontainers available. This PR also switches the `clickhouse-jdbc`'s classifier from `http` to `shaded`, the reason is, `http` does not ship ApacheHttpClient5, previously, it happened to work because `iceberg-runtime-spark3.5_2.12` packaged un-relocated ApacheHttpClient5 classes, but it gets fixed in Iceberg 1.8.0, then `clickhouse-jdbc:http` stop working. ``` java.lang.NoClassDefFoundError: org/apache/hc/core5/http/HttpRequest ``` Additionally, this PR bumps `clickhouse-jdbc` from 0.6.0 to 0.6.5. ### How was this patch tested? Pass GHA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #6915 from pan3793/fix-ch-test. Closes #6915 996f095 [Cheng Pan] Pin clickhouse-server:24.3.15 d633df0 [Cheng Pan] Bump clickhouse-jdbc 0.6.5 214c8a2 [Cheng Pan] Fix ClickHouse integration tests Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit d49c631) Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 36d625b commit 9750558

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

externals/kyuubi-jdbc-engine/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<dependency>
113113
<groupId>com.clickhouse</groupId>
114114
<artifactId>clickhouse-jdbc</artifactId>
115-
<classifier>http</classifier>
115+
<classifier>shaded</classifier>
116116
<scope>test</scope>
117117
</dependency>
118118
</dependencies>

externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import org.apache.kyuubi.engine.jdbc.WithJdbcServerContainer
2323

2424
trait WithClickHouseContainer extends WithJdbcServerContainer {
2525

26-
private val clickHouseDockerImage = "clickhouse/clickhouse-server:24.3"
26+
private val clickHouseDockerImage = "clickhouse/clickhouse-server:24.3.15"
2727

2828
override val containerDef: ClickHouseContainer.Def = ClickHouseContainer.Def(dockerImageName =
2929
DockerImageName.parse(clickHouseDockerImage))

integration-tests/kyuubi-jdbc-it/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<dependency>
107107
<groupId>com.clickhouse</groupId>
108108
<artifactId>clickhouse-jdbc</artifactId>
109-
<classifier>http</classifier>
109+
<classifier>shaded</classifier>
110110
<scope>test</scope>
111111
</dependency>
112112

@@ -188,7 +188,7 @@
188188
<groupId>com.clickhouse</groupId>
189189
<artifactId>clickhouse-jdbc</artifactId>
190190
<version>${clickhouse-java.version}</version>
191-
<classifier>http</classifier>
191+
<classifier>shaded</classifier>
192192
<overWrite>true</overWrite>
193193
<outputDirectory>${project.build.directory}</outputDirectory>
194194
</artifactItem>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
<scalatestplus.version>3.2.16.0</scalatestplus.version>
194194
<scopt.version>4.1.0</scopt.version>
195195
<slf4j.version>1.7.36</slf4j.version>
196-
<clickhouse-java.version>0.6.0</clickhouse-java.version>
196+
<clickhouse-java.version>0.6.5</clickhouse-java.version>
197197
<snakeyaml.version>2.2</snakeyaml.version>
198198
<!--
199199
DO NOT forget to change the following properties when change the minor version of Spark:
@@ -1108,7 +1108,7 @@
11081108
<groupId>com.clickhouse</groupId>
11091109
<artifactId>clickhouse-jdbc</artifactId>
11101110
<version>${clickhouse-java.version}</version>
1111-
<classifier>http</classifier>
1111+
<classifier>shaded</classifier>
11121112
</dependency>
11131113

11141114
<!-- flink -->

0 commit comments

Comments
 (0)