This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new d49c6314d0 [KYUUBI #6915] Fix ClickHouse integration tests
d49c6314d0 is described below
commit d49c6314d06f53f59fff4a92f664a72579f3b842
Author: Cheng Pan <[email protected]>
AuthorDate: Fri Feb 14 10:23:20 2025 +0800
[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
https://github.com/testcontainers/testcontainers-java/pull/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
996f095e0 [Cheng Pan] Pin clickhouse-server:24.3.15
d633df07c [Cheng Pan] Bump clickhouse-jdbc 0.6.5
214c8a227 [Cheng Pan] Fix ClickHouse integration tests
Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
externals/kyuubi-jdbc-engine/pom.xml | 2 +-
.../kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala | 2 +-
integration-tests/kyuubi-jdbc-it/pom.xml | 4 ++--
pom.xml | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/externals/kyuubi-jdbc-engine/pom.xml
b/externals/kyuubi-jdbc-engine/pom.xml
index 4a3ee70934..272e7e0969 100644
--- a/externals/kyuubi-jdbc-engine/pom.xml
+++ b/externals/kyuubi-jdbc-engine/pom.xml
@@ -112,7 +112,7 @@
<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
- <classifier>http</classifier>
+ <classifier>shaded</classifier>
<scope>test</scope>
</dependency>
diff --git
a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala
b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala
index 483876cc47..bd84e0356f 100644
---
a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala
+++
b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/clickhouse/WithClickHouseContainer.scala
@@ -23,7 +23,7 @@ import org.apache.kyuubi.engine.jdbc.WithJdbcServerContainer
trait WithClickHouseContainer extends WithJdbcServerContainer {
- private val clickHouseDockerImage = "clickhouse/clickhouse-server:24.3"
+ private val clickHouseDockerImage = "clickhouse/clickhouse-server:24.3.15"
override val containerDef: ClickHouseContainer.Def =
ClickHouseContainer.Def(dockerImageName =
DockerImageName.parse(clickHouseDockerImage))
diff --git a/integration-tests/kyuubi-jdbc-it/pom.xml
b/integration-tests/kyuubi-jdbc-it/pom.xml
index a63a9639a3..a5f9b4e2ed 100644
--- a/integration-tests/kyuubi-jdbc-it/pom.xml
+++ b/integration-tests/kyuubi-jdbc-it/pom.xml
@@ -106,7 +106,7 @@
<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
- <classifier>http</classifier>
+ <classifier>shaded</classifier>
<scope>test</scope>
</dependency>
@@ -188,7 +188,7 @@
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse-java.version}</version>
- <classifier>http</classifier>
+ <classifier>shaded</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
diff --git a/pom.xml b/pom.xml
index 4944088497..8c925e10af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,7 +194,7 @@
<scalatestplus.version>3.2.16.0</scalatestplus.version>
<scopt.version>4.1.0</scopt.version>
<slf4j.version>1.7.36</slf4j.version>
- <clickhouse-java.version>0.6.0</clickhouse-java.version>
+ <clickhouse-java.version>0.6.5</clickhouse-java.version>
<snakeyaml.version>2.2</snakeyaml.version>
<!--
DO NOT forget to change the following properties when change the
minor version of Spark:
@@ -1120,7 +1120,7 @@
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse-java.version}</version>
- <classifier>http</classifier>
+ <classifier>shaded</classifier>
</dependency>
<!-- flink -->