diqiu50 opened a new pull request, #13358:
URL: https://github.com/apache/gravitino/pull/13358

   ### What changes were proposed in this pull request?
   
   `GravitinoConfig.getIcebergRestCatalogConfig()` now fails fast when a 
`lakehouse-iceberg` catalog
   is routed through the Iceberg REST server but the connector's `authType` 
(`simple`, `basic`,
   `kerberos`) has no Trino Iceberg REST security equivalent and
   `gravitino.iceberg.rest-catalog.security` was not set explicitly.
   
   ### Why are the changes needed?
   
   Such a catalog previously registered successfully and every query failed at 
`fetchConfig` with a
   `NotAuthorizedException` far from its actual cause. Failing at registration 
surfaces the real
   problem with an actionable message instead.
   
   Fix: #13357
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. A `lakehouse-iceberg` catalog routed through the IRC with 
`authType=simple/basic/kerberos`
   and no explicit `gravitino.iceberg.rest-catalog.security` now fails to 
register instead of
   registering and failing every query.
   
   ### How was this patch tested?
   
   Added unit tests in `TestGravitinoConfig` covering the new failure and its 
`security=NONE` /
   explicit-security escape hatches; updated an existing 
`TestIcebergCatalogPropertyConverter` test
   that relied on the previously-silent behavior.
   `./gradlew :trino-connector:trino-connector:test -PskipITs` — 306 tests, 0 
failures.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to