This is an automated email from the ASF dual-hosted git repository.
jerryshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new beb95b838d [#14670] fix(build): Bump httpcore5 to 5.4.4 and postgresql
to 42.7.14 (#14671)
beb95b838d is described below
commit beb95b838d7fce6bf8f48fbff545c067a8b19717
Author: geyanggang <[email protected]>
AuthorDate: Fri Nov 6 19:45:08 2026 +0800
[#14670] fix(build): Bump httpcore5 to 5.4.4 and postgresql to 42.7.14
(#14671)
### What changes were proposed in this pull request?
- Align `httpcore5` / `httpcore5-h2` to `5.4.4` via the version catalog
plus a root `resolutionStrategy.force`, so direct and transitive paths
all resolve to it.
- Bump the `postgresql` driver 42.7.11 → 42.7.14 in the version catalog
and the docker / integration-test download scripts, and refresh the
pgjdbc version referenced in `PostgreSqlTypeConverter` comments.
### Why are the changes needed?
Routine dependency maintenance: keep both libraries on the latest patch
of the line already in use. httpclient5 is already on 5.4.4 and Iceberg
brings httpclient5 5.6.1, both of which manage the httpcore5 transports
on an older line, so a force is needed to align them across direct and
transitive paths. postgresql 42.7.14 is a same-line patch; pgjdbc
`TypeInfoCache.getScale` behavior is unchanged, so NUMERIC handling is
unaffected.
Fix: #14670
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
- `dependencyInsight` confirms httpcore5/httpcore5-h2 resolve to 5.4.4
and postgresql to 42.7.14 across the shipped modules.
- Unit tests pass for the affected modules (postgresql / lineage /
client-java / glue / iceberg-rest-server / lance-rest-server).
- Docker-based integration tests to be run in CI.
---
build.gradle.kts | 6 ++++++
.../catalog/postgresql/converter/PostgreSqlTypeConverter.java | 4 ++--
dev/docker/gravitino/gravitino-dependency.sh | 2 +-
dev/docker/trino/Dockerfile | 2 +-
dev/docker/trino/trino-dependency.sh | 2 +-
gradle/libs.versions.toml | 5 +++--
.../java/org/apache/gravitino/integration/test/util/BaseIT.java | 2 +-
trino-connector/integration-test/trino-test-tools/download_jar.sh | 6 +++---
8 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index b52960826b..7a7f2e3d68 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -677,6 +677,7 @@ fun excludePackagesForSparkConnector(project: Project) {
}
val commonsBeanutilsVersion: String = libs.versions.commons.beanutils.get()
+val httpcore5Version: String = libs.versions.httpcore5.get()
subprojects {
// Gravitino Python client project didn't need to apply the java plugin
@@ -698,9 +699,14 @@ subprojects {
// Force upgrade commons-beanutils/snappy-java for all subprojects to
resolve outdated transitive versions
// commons-beanutils: pulled by Hadoop, Hive, Spark, Flink, etc.
// snappy-java: pulled by Hadoop, Kafka, Iceberg, etc.
+ // httpcore5/httpcore5-h2: pulled by httpclient5 (directly and via Iceberg),
whose POM still
+ // manages them on the 5.3/5.4.0 line; force the 5.4.4 patch so every module
uses the same,
+ // latest 5.4 patch. It stays API-compatible with the httpclient5 versions
on the classpath.
configurations.all {
resolutionStrategy.force("commons-beanutils:commons-beanutils:$commonsBeanutilsVersion")
resolutionStrategy.force("org.xerial.snappy:snappy-java:$snappyJavaVersion")
+
resolutionStrategy.force("org.apache.httpcomponents.core5:httpcore5:$httpcore5Version")
+
resolutionStrategy.force("org.apache.httpcomponents.core5:httpcore5-h2:$httpcore5Version")
// Exclude log4j 1.x (CVE-2020-9493, CVSS 9.8) pulled transitively by Hive
and Hadoop.
// The safe log4j-1.2-api bridge from Log4j 2.x is already included in the
log4j bundle.
diff --git
a/catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java
b/catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java
index 7c8b3f6325..301a0a67e4 100644
---
a/catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java
+++
b/catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java
@@ -126,8 +126,8 @@ public class PostgreSqlTypeConverter extends
JdbcTypeConverter {
// unsigned representation, for example 2045 for NUMERIC(2, -3).
// PostgreSQL's numeric_typmod_scale sign-extends the low 11 bits:
//
https://github.com/postgres/postgres/blob/REL_15_0/src/backend/utils/adt/numeric.c#L851-L864
- // pgjdbc 42.7.11 TypeInfoCache.getScale instead returns the low 16
bits unsigned:
- //
https://github.com/pgjdbc/pgjdbc/blob/REL42.7.11/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L863-L875
+ // pgjdbc 42.7.14 TypeInfoCache.getScale instead returns the low 16
bits unsigned:
+ //
https://github.com/pgjdbc/pgjdbc/blob/REL42.7.14/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L863-L875
if (numericScale >= 1024 && numericScale <= 2047) {
numericScale -= 2048;
}
diff --git a/dev/docker/gravitino/gravitino-dependency.sh
b/dev/docker/gravitino/gravitino-dependency.sh
index b5e08314f2..a0e6ee0f4f 100755
--- a/dev/docker/gravitino/gravitino-dependency.sh
+++ b/dev/docker/gravitino/gravitino-dependency.sh
@@ -74,7 +74,7 @@ mkdir -p "${jdbc_driver_dir}"
mysql_driver="mysql-connector-java-8.0.27.jar"
wget
"https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.27/$mysql_driver"
-O "${jdbc_driver_dir}/${mysql_driver}"
-pg_driver="postgresql-42.7.11.jar"
+pg_driver="postgresql-42.7.14.jar"
wget "https://jdbc.postgresql.org/download/${pg_driver}" -O
"${jdbc_driver_dir}/${pg_driver}"
echo "Finish downloading"
diff --git a/dev/docker/trino/Dockerfile b/dev/docker/trino/Dockerfile
index 996100edbb..a276b86bea 100644
--- a/dev/docker/trino/Dockerfile
+++ b/dev/docker/trino/Dockerfile
@@ -23,7 +23,7 @@ USER root
COPY --chown=trino:trino packages/trino/conf /etc/trino
COPY --chown=trino:trino
packages/gravitino-trino-connector/mysql-connector-java-8.0.27.jar
/usr/lib/trino/plugin/iceberg/
-COPY --chown=trino:trino
packages/gravitino-trino-connector/postgresql-42.7.11.jar
/usr/lib/trino/plugin/iceberg/
+COPY --chown=trino:trino
packages/gravitino-trino-connector/postgresql-42.7.14.jar
/usr/lib/trino/plugin/iceberg/
RUN mkdir /tmp/gravitino
COPY --chown=trino:trino packages/gravitino-trino-connector /tmp/gravitino
diff --git a/dev/docker/trino/trino-dependency.sh
b/dev/docker/trino/trino-dependency.sh
index 34c44d37e4..9213b2bd05 100755
--- a/dev/docker/trino/trino-dependency.sh
+++ b/dev/docker/trino/trino-dependency.sh
@@ -52,7 +52,7 @@ ${gravitino_home}/gradlew
:trino-connector:${connector_module}:assembleTrinoConn
cp -r "${gravitino_home}/distribution/gravitino-${connector_module}"
"${trino_dir}/packages/gravitino-trino-connector"
MYSQL_VERSION="8.0.27"
-PG_VERSION="42.7.11"
+PG_VERSION="42.7.14"
MYSQL_JAVA_CONNECTOR_URL="https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_VERSION}/mysql-connector-java-${MYSQL_VERSION}.jar"
PG_JAVA_CONNECTOR_URL="https://jdbc.postgresql.org/download/postgresql-${PG_VERSION}.jar"
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 1a3f3c6914..1a22f7c0a1 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -57,7 +57,8 @@ hadoop-minikdc = "3.3.6"
re2j = "1.7"
httpclient = "4.4.1"
httpclient5 = "5.4.4"
-httpcore5 = "5.3.4"
+# Keep httpcore5 on the same 5.4 line as httpclient5: httpclient5 5.4.x
expects httpcore5 5.4.x.
+httpcore5 = "5.4.4"
micrometer-core = "1.12.2"
mockserver = "5.15.0"
# 7.3.x moves to Jackson 2.19, which isn't audited in
dev/release/maven/dependencies.txt yet.
@@ -112,7 +113,7 @@ clickhouse = "0.7.1"
lz4 = "1.8.0"
snappy-java = "1.1.10.8"
mysql = "8.0.33"
-postgresql = "42.7.11"
+postgresql = "42.7.14"
immutables-value = "2.11.7"
selenium = "4.33.0"
rauschig = "1.2.0"
diff --git
a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java
b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java
index bdbeaba005..02cb13e94e 100644
---
a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java
+++
b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java
@@ -114,7 +114,7 @@ public class BaseIT {
"https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.26/mysql-connector-java-8.0.26.jar";
public static final String DOWNLOAD_POSTGRESQL_JDBC_DRIVER_URL =
- "https://jdbc.postgresql.org/download/postgresql-42.7.11.jar";
+ "https://jdbc.postgresql.org/download/postgresql-42.7.14.jar";
public static final String DOWNLOAD_CLICKHOUSE_JDBC_DRIVER_URL =
"https://repo1.maven.org/maven2/com/clickhouse/clickhouse-jdbc/0.7.1/clickhouse-jdbc-0.7.1-all.jar";
diff --git a/trino-connector/integration-test/trino-test-tools/download_jar.sh
b/trino-connector/integration-test/trino-test-tools/download_jar.sh
index 6970cd7334..2b979520eb 100755
--- a/trino-connector/integration-test/trino-test-tools/download_jar.sh
+++ b/trino-connector/integration-test/trino-test-tools/download_jar.sh
@@ -54,10 +54,10 @@ download_mysql_jar() {
}
download_postgresql_jar() {
- download_jar "postgresql-42.7.11.jar" \
- "https://jdbc.postgresql.org/download/postgresql-42.7.11.jar" \
+ download_jar "postgresql-42.7.14.jar" \
+ "https://jdbc.postgresql.org/download/postgresql-42.7.14.jar" \
"$GRAVITINO_SERVER_DIR/catalogs/jdbc-postgresql/libs"
- cp -rp
$GRAVITINO_SERVER_DIR/catalogs/jdbc-postgresql/libs/postgresql-42.7.11.jar
$GRAVITINO_SERVER_DIR/catalogs/lakehouse-iceberg/libs
+ cp -rp
$GRAVITINO_SERVER_DIR/catalogs/jdbc-postgresql/libs/postgresql-42.7.14.jar
$GRAVITINO_SERVER_DIR/catalogs/lakehouse-iceberg/libs
}
download_iceberg_aws_bundle() {