You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "roryqi (via GitHub)" <gi...@apache.org> on 2026/08/04 11:55:33 UTC
[PR] [MINOR] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
roryqi opened a new pull request, #12358:
URL: https://github.com/apache/gravitino/pull/12358
### What changes were proposed in this pull request?
Relocate `com.fasterxml.jackson` classes in the Iceberg Aliyun bundle to an internal shaded namespace, and exclude the original Jackson Maven metadata from the shadow jar.
This also adds a regression test that inspects the generated shadow jar to ensure Jackson is relocated and no unshaded Jackson classes, services, or metadata are exposed.
### Why are the changes needed?
The Iceberg Aliyun bundle includes Gravitino Aliyun credential providers, which pull Jackson into the fat jar. Leaving those classes unshaded can leak Jackson onto the server classpath and conflict with the Jackson version resolved by Iceberg REST server dependencies.
Fix: #12357
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- `./gradlew :bundles:iceberg-aliyun-bundle:test`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi commented on PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#issuecomment-5218997739
> no more comments from my side, please fix the comment from copilot
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi merged PR #12358:
URL: https://github.com/apache/gravitino/pull/12358
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi commented on PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#issuecomment-5179520320
> Shall we backport this to branch-1.3?
Yes, we should always backport fix pull request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#issuecomment-5179491232
Shall we backport this to branch-1.3?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#issuecomment-5181623324
<!-- coverage-report -->
### Code Coverage Report
|Overall Project|68.16% **`-0.03%`**|:green_circle:|
|:-|:-|:-:|
|Files changed|66.73%|:green_circle:|
<br>
|Module|Coverage||
|:-|:-|:-:|
|aliyun|1.72%|:red_circle:|
|api|49.34%|:green_circle:|
|authorization-common|85.96%|:green_circle:|
|aws|42.04%|:green_circle:|
|azure|2.47%|:red_circle:|
|catalog-common|9.92%|:red_circle:|
|catalog-fileset|79.74%|:green_circle:|
|catalog-glue|66.91% **`-12.02%`**|:green_circle:|
|catalog-hive|79.4%|:green_circle:|
|catalog-jdbc-common|45.7%|:green_circle:|
|catalog-jdbc-doris|81.8%|:green_circle:|
|catalog-jdbc-mysql|79.33%|:green_circle:|
|catalog-jdbc-postgresql|83.39%|:green_circle:|
|catalog-jdbc-starrocks|79.16%|:green_circle:|
|catalog-kafka|77.01%|:green_circle:|
|catalog-lakehouse-generic|59.18%|:green_circle:|
|catalog-lakehouse-hudi|79.1%|:green_circle:|
|catalog-lakehouse-iceberg|85.86%|:green_circle:|
|catalog-lakehouse-paimon|84.23%|:green_circle:|
|catalog-model|77.72%|:green_circle:|
|cli|44.48%|:green_circle:|
|client-java|78.27%|:green_circle:|
|common|52.13%|:green_circle:|
|core|83.03% **`-0.34%`**|:green_circle:|
|filesystem-hadoop3|77.28%|:green_circle:|
|flink|0.0%|:red_circle:|
|flink-common|48.68%|:green_circle:|
|flink-runtime|0.0%|:red_circle:|
|gcp|14.12%|:red_circle:|
|hadoop-auth|68.0%|:green_circle:|
|hadoop-common|12.7%|:red_circle:|
|hive-metastore-common|53.4%|:green_circle:|
|iceberg-aliyun-bundle|0.0%|:red_circle:|
|iceberg-common|64.75%|:green_circle:|
|iceberg-rest-server|75.1%|:green_circle:|
|idp-basic|86.02%|:green_circle:|
|integration-test-common|0.0%|:red_circle:|
|jobs|66.17%|:green_circle:|
|lance-common|24.5%|:red_circle:|
|lance-rest-server|64.23%|:green_circle:|
|lineage|53.02%|:green_circle:|
|optimizer|83.24%|:green_circle:|
|optimizer-api|21.95%|:red_circle:|
|server|85.88%|:green_circle:|
|server-common|76.45%|:green_circle:|
|spark|28.57%|:red_circle:|
|spark-common|45.89%|:green_circle:|
|tencent|69.84%|:green_circle:|
|trino-connector|40.29%|:green_circle:|
<details>
<summary>Files</summary>
|Module|File|Coverage||
|:-|:-|:-|:-:|
|catalog-glue|[GlueClientProvider.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueClientProvider.java)|100.0%|:green_circle:|
||[GlueIcebergTableHelper.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueIcebergTableHelper.java)|39.39%|:red_circle:|
|core|[BaseEntityCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/BaseEntityCache.java)|100.0%|:green_circle:|
||[EntityCacheRelationKey.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/EntityCacheRelationKey.java)|100.0%|:green_circle:|
||[ReverseIndexRules.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/ReverseIndexRules.java)|98.57%|:green_circle:|
||[EntityCacheWeigher.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/EntityCacheWeigher.java)|95.45%|:green_circle:|
||[TagManager.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/tag/TagManager.java)|83.68%|:green_circle:|
||[CaffeineEntityCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/CaffeineEntityCache.java)|82.59%|:green_circle:|
||[ReverseIndexCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java)|79.03%|:green_circle:|
||[PolicyManager.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/policy/PolicyManager.java)|78.81%|:green_circle:|
||[RelationalEntityStore.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java)|67.66%|:green_circle:|
||[SegmentedLock.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/SegmentedLock.java)|45.0%|:red_circle:|
||[NoOpsCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/NoOpsCache.java)|25.0%|:red_circle:|
||[EntityCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/EntityCache.java)|0.0%|:red_circle:|
||[SupportsEntityStoreCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/SupportsEntityStoreCache.java)|0.0%|:red_circle:|
||[SupportsRelationEntityCache.java](https://github.com/qqqttt123/gravitino/blob/cbb4f0e38eb066e464234200b24e9c76dfecbd91/core/src/main/java/org/apache/gravitino/cache/SupportsRelationEntityCache.java)|0.0%|:red_circle:|
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#12357] fix: Relocate Jackson in Iceberg Aliyun bundle [gravitino]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#discussion_r3736761720
##########
bundles/iceberg-aliyun-bundle/build.gradle.kts:
##########
@@ -48,10 +52,35 @@ tasks.withType(ShadowJar::class.java) {
exclude(project(":catalogs:hadoop-common"))
}
+ // :bundles:aliyun pulls Jackson into this fat jar. Relocate it so the bundle remains
+ // self-contained without exposing com.fasterxml.jackson classes on the server classpath.
+ relocate(
+ "com.fasterxml.jackson",
+ "org.apache.gravitino.iceberg.aliyun.shaded.com.fasterxml.jackson"
+ )
+
+ // POM metadata is not relocated by shadow and would still advertise the original
+ // Jackson coordinates.
+ exclude("META-INF/maven/com.fasterxml.jackson.core/**")
+ exclude("META-INF/maven/com.fasterxml.jackson.datatype/**")
+ exclude("META-INF/maven/com.fasterxml.jackson.module/**")
+ exclude("META-INF/maven/com.fasterxml.jackson/**")
+
mergeServiceFiles()
}
tasks.jar {
dependsOn(tasks.named("shadowJar"))
archiveClassifier.set("empty")
}
+
+tasks.test {
+ val shadowJar = tasks.named<ShadowJar>("shadowJar")
+ dependsOn(shadowJar)
Review Comment:
Declare the generated archive as an input to `test`. `dependsOn` only orders/builds `shadowJar`; it does not track the archive contents, so an incremental build can mark this regression test `UP-TO-DATE` after a shadow-only output change and skip inspecting the new jar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org