Skip to content

[Cherry-pick to branch-1.3] [#12554] improvement(trino-connector): Route lakehouse-iceberg catalogs through the Iceberg REST server (#12555) - #12754

Merged
diqiu50 merged 4 commits into
branch-1.3from
cherry-pick-b3b17770-to-branch-1.3
Sep 3, 2026
Merged

[Cherry-pick to branch-1.3] [#12554] improvement(trino-connector): Route lakehouse-iceberg catalogs through the Iceberg REST server (#12555)#12754
diqiu50 merged 4 commits into
branch-1.3from
cherry-pick-b3b17770-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: b3b1777
  • Target branch: branch-1.3
  • Status: ⚠️ Has conflicts - manual resolution required

…gs through the Iceberg REST server (#12555)

### What changes were proposed in this pull request?

The Trino connector builds an internal Iceberg REST catalog pointing at
the Gravitino Iceberg REST server for every `lakehouse-iceberg` catalog,
instead of translating `catalog-backend` into Trino's `jdbc` or
`hive_metastore` catalog type.

Three connector-level properties, configured once per Trino cluster:

- `gravitino.iceberg.rest-enabled` (default `true`)
- `gravitino.iceberg.rest-uri`
- `gravitino.iceberg.rest-catalog.` — prefix rewritten to
`iceberg.rest-catalog.`, carrying the IRC's authentication

Everything else is derived from the catalog. A catalog with
`catalog-backend=rest` is not re-routed.

This also drops Trino 435-439 support. The routing sets
`iceberg.rest-catalog.vended-credentials-enabled`, which Trino only
recognizes from 439 onwards, and Trino rejects unknown catalog
properties outright. The minimum supported version is now 440.

### Why are the changes needed?

`credential-providers=s3-token` is silently non-functional on this path.

Fix: #12554

### Does this PR introduce _any_ user-facing change?

Yes, two breaking changes, both needing a release note:

- `gravitino.iceberg.rest-enabled` defaults to `true`, so on upgrade a
metalake with `catalog-backend=jdbc` or `hive` Iceberg catalogs fails to
load them unless `gravitino.iceberg.rest-uri` is set, or the switch is
turned off.
- Trino 435-439 is no longer supported; the `trino-connector-435-439`
module is removed.

Three new connector properties. Docs updated under
`docs/trino-connector/`.

### How was this patch tested?

Unit tests: 155 pass, 20 new.

Integration test: the existing `lakehouse-iceberg` testset runs over the
new path, 24/24 pass across a hive-backend and a jdbc-backend catalog.

Not verified: end-to-end `s3-token` vending. The test warehouse is HDFS,
which skips credential generation, so no temporary credential is
actually issued. This is coverable without a cloud account —
`MinIOContainer` and `IcebergRESTMinIOTokenAuthorizationIT` already
exercise real STS `AssumeRole` at the IRC layer — and is worth a
follow-up.
# Conflicts:
#	docs/trino-connector/configuration.md
#	trino-connector/trino-connector/src/test/java/org/apache/gravitino/trino/connector/catalog/TestCatalogConnectorManager.java
@github-actions github-actions Bot added cherry-pick Automatically opened cherry-pick PR cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge labels Aug 31, 2026
@github-actions
github-actions Bot requested a review from jerryshao August 31, 2026 13:41
Resolve conflict markers left by the cherry-pick bot in
TestCatalogConnectorManager.java and configuration.md, dropping test
methods/imports that belong to an unrelated feature (#12572) not yet
present on branch-1.3. Also merge the branch-1.3 update that drops
Trino 435-439 support (#12707), which changes the correct
multi-metalake version range from 435-445 back to 440-445.
…0-to-branch-1.3

# Conflicts:
#	docs/trino-connector/configuration.md
#	trino-connector/trino-connector/src/test/java/org/apache/gravitino/trino/connector/TestGravitinoConnectorPluginManager.java
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 68.34% -0.08% 🟢
Files changed 64.04% 🟢

Module Coverage
aliyun 1.72% 🔴
api 47.7% 🟢
authorization-common 85.96% 🟢
aws 42.04% 🟢
azure 2.47% 🔴
catalog-common 10.4% 🔴
catalog-fileset 80.23% 🟢
catalog-glue 68.95% 🟢
catalog-hive 79.42% 🟢
catalog-jdbc-clickhouse 84.7% 🟢
catalog-jdbc-common 45.48% 🟢
catalog-jdbc-doris 82.61% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.33% 🟢
catalog-jdbc-oceanbase 78.6% 🟢
catalog-jdbc-postgresql 83.39% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 59.18% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.86% 🟢
catalog-lakehouse-paimon 82.14% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 78.2% +0.11% 🟢
common 50.74% -0.08% 🟢
core 83.0% -0.62% 🟢
filesystem-hadoop3 77.3% 🟢
flink 0.0% 🔴
flink-common 49.22% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.88% 🔴
hive-metastore-common 53.77% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 58.15% 🟢
iceberg-rest-server 73.95% 🟢
idp-basic 86.02% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 24.42% 🔴
lance-rest-server 60.13% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 86.94% +0.06% 🟢
server-common 76.28% 🟢
spark 28.57% 🔴
spark-common 41.66% 🟢
trino-connector 51.18% +6.51% 🟢
Files
Module File Coverage
client-java GravitinoClientBase.java 82.29% 🟢
common IcebergRESTServiceResponse.java 0.0% 🔴
core AuxiliaryServiceManager.java 70.59% 🟢
GravitinoEnv.java 12.5% 🔴
server IcebergRESTServiceOperations.java 91.3% 🟢
trino-connector IcebergRestUriDiscovery.java 100.0% 🟢
IcebergCatalogPropertyConverter.java 94.44% 🟢
IcebergConnectorAdapter.java 92.0% 🟢
GravitinoConfig.java 88.34% 🟢
CatalogRegister.java 68.89% 🟢
GravitinoConnectorFactory.java 68.75% 🟢
DefaultCatalogConnectorFactory.java 56.52% 🔴
CatalogConnectorManager.java 49.73% 🔴
GravitinoConnectorPluginManager.java 41.67% 🔴

@jerryshao

Copy link
Copy Markdown
Contributor

@diqiu50 please fix the conflict.

…0-to-branch-1.3

# Conflicts:
#	docs/trino-connector/configuration.md
@diqiu50 diqiu50 changed the title [DO NOT MERGE] [Cherry-pick to branch-1.3] [#12554] improvement(trino-connector): Route lakehouse-iceberg catalogs through the Iceberg REST server (#12555) [Cherry-pick to branch-1.3] [#12554] improvement(trino-connector): Route lakehouse-iceberg catalogs through the Iceberg REST server (#12555) Sep 3, 2026
@diqiu50 diqiu50 removed the cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge label Sep 3, 2026
@diqiu50
diqiu50 merged commit cddf925 into branch-1.3 Sep 3, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants