apache / apache/shardingsphere

Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests

Open
#29,052 6 comments 0 reactions 1 assignee Claimed by @linghengqian View on GitHub
in: proxy native type: enhancement
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
11h 38m
Merged PRs (30d)
326

Description

## Feature Request

**For English only**, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will **close it**.

Please answer these questions before submitting your issue. Thanks!

### Is your feature request related to a problem?

- apache/shardingsphere#21347.

### Describe the feature you would like.

- In the current master branch, for the `sharding`, `readwrite-splitting`, `mask`, `shadow` and `encrypt` features in `standalone` mode and H2Database, there are already corresponding GraalVM Reachability Metadata and corresponding nativeTest-related unit tests located under GraalVM Native Image.
- The previous PR did not cover further situations. We need to add additional unit tests and corresponding GraalVM Reachability Metadata for the following functions. Some unit tests will require the GraalVM Reachability Metadata of testcontainers.
- Modes except Local
- [x] `apache/zookeeper`
- [ ] `gcr.io/etcd-development/etcd:v3.5.10`
- Distributed Transactions
- [x] `atomikos/transactions-essentials`
- [x] `jbosstm/narayana`
- [x] `apache/seata-server:2.6.0`
- Databases
- [x] `h2database/h2database`
- [x] `mysql:9.7.1-oraclelinux9`
- [x] `postgres:18.4-trixie`
- [x] `opengauss/opengauss-server:7.0.0-RC3.B025-openEuler22.03`
- [x] `mcr.microsoft.com/mssql/server:2025-CU6-ubuntu-24.04`
- [ ] `gvenzl/oracle-free` or `gvenzl/oracle-xe`
- [x] `dyrnq/doris:4.1.2`
- [x] `prestodb/presto:0.298.1`
- [x] `firebirdsql/firebird:5.0.4-bookworm`
- [x] `apache/hive:4.0.1`
- [x] `clickhouse/clickhouse-server:26.6.1.1193`
- Other features
- [x] DistSQL
- [x] Logging - `qos-ch/logback`

- In the current master branch, ShardingSphere temporarily hosts the GraalVM Reachability Metadata of some third-party libraries. These irrelevant json entries should be submitted to https://github.com/oracle/graalvm-reachability-metadata and then deleted from the ShardingSphere side. This sub-work is initially planned to be completed before the release of GraalVM CE for JDK 29.
- [ ] `ch.qos.logback:logback-core:1.3.16`
- [ ] `com.alibaba:druid:1.2.25`
- [ ] `com.clickhouse:clickhouse-jdbc:0.9.8-all`
- [ ] `com.github.ben-manes.caffeine:caffeine:2.9.3`
- Partially located at https://github.com/oracle/graalvm-reachability-metadata/pull/388 .
- [ ] `com.h2database:h2:2.2.224`
- [ ] `com.mysql:mysql-connector-j:8.3.0`
- [ ] `com.zaxxer:HikariCP:4.0.3`
- [ ] `org.apache.calcite:calcite-core:1.42.0`
- [ ] `org.apache.groovy:groovy:4.0.22`
- [ ] `org.apache.seata:seata-all:2.6.0`
- [ ] `org.jboss.logging:jboss-logging:3.2.1.Final`
- [ ] `org.jboss.narayana.jta:jta:5.12.7.Final`
- [ ] `org.firebirdsql.jdbc:jaybird:5.0.6.java8`
- [ ] `org.hamcrest:hamcrest:3.0`
- [ ] `com.microsoft.sqlserver:mssql-jdbc:12.10.1.jre8`
- [ ] `com.facebook.presto:presto-jdbc:0.292`
- [ ] `org.testcontainers:testcontainers-junit-jupiter:2.0.1`
- [ ] `org.mariadb.jdbc:mariadb-java-client:2.7.14`
- [x] `org.springframework:spring-jcl:5.3.39`
- Removed via #38964 .
- [x] `org.slf4j:slf4j-api:1.7.36`
- Removed via #38964 .
- [x] `io.vertx:vertx-core:4.5.1`
- Removed via #38964 .
- [x] `io.netty:netty-transport-classes-epoll:4.1.121.Final`
- Removed via #38964 .
- [x] `io.grpc:grpc-netty:1.65.1`
- Removed via #38964 .
- [x] `com.typesafe:config:1.2.1`
- Removed via #38964 .
- [x] `com.google.protobuf:protobuf-java:3.25.8`
- Partially located at https://github.com/oracle/graalvm-reachability-metadata/pull/167 .
- Removed via #38964 .
- [x] `com.github.docker-java:docker-java-api:3.6.0`
- Removed via #38964 .
- [x] `com.atomikos:transactions:6.0.0`
- Removed via #38964 .
- [x] `org.apache.hadoop:hadoop-common:3.3.6`
- Removed via #36264 .
- [x] `org.apache.zookeeper:zookeeper:3.9.0`
- Removed via #36264 .
- [x] `org.apiguardian:apiguardian-api:1.1.2`
- Removed via #36264 .
- [x] `org.junit.jupiter:junit-jupiter:5.11.1`
- Removed via #36264 .
- [x] `org.apache.hive:hive-jdbc:4.0.1`
- Removed via #36114 .
- [x] `org.apache.shardingsphere.elasticjob:elasticjob-lite-core:3.0.4`
- Removed via #33179.
- [x] `org.glassfish.jaxb:jaxb-runtime:2.3.1`
- Removed directly in apache/shardingsphere#29384, no need to commit to GraalVM Reachability Metadata Repository side.

- The current issue involves several user-side experience issues.
- [x] Remove the requirement for `--report-unsupported-elements-at-runtime` of `buildArgs` in GraalVM Native Build Tools. This requires further breaking ShardingSphere's compatibility with previous versions under GraalVM Native Image.
- [x] Bump GraalVM CE version for handling NativeTest and building ShardingSphere Proxy Native from `GraalVM Community Edition for JDK 17.0.9` to `GraalVM Community Edition 25.0.2 based on OpenJDK 25.0.2+10`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.