diqiu50 opened a new pull request, #13195: URL: https://github.com/apache/gravitino/pull/13195
### What changes were proposed in this pull request? Port the enterprise integration changes to the Apache Trino connector: - Defer native metadata initialization for `lakehouse-iceberg` catalogs using `OAUTH2_PASSTHROUGH`. - Use the operation session when initializing native metadata, preserve query lifecycle ordering, and propagate native errors. - Inherit Gravitino service OAuth2 properties only when REST security is `OAUTH2`. - Add 10 regression tests covering metadata initialization, session handling, lifecycle behavior, and configuration inheritance. ### Why are the changes needed? In an enterprise deployment using Starburst's `OAUTH2_PASSTHROUGH` mode, management sessions may have no delegated user token. Eager native metadata initialization can trigger authentication before metadata-only operations are served through Gravitino. The shared configuration code also passes service OAuth2 defaults to explicitly configured non-OAuth2 REST security modes. This change improves compatibility with downstream connectors. The reported authentication failure has not been reproduced with upstream Trino. Fix: #13194 ### Does this PR introduce _any_ user-facing change? For managed Iceberg catalogs configured with `OAUTH2_PASSTHROUGH`, metadata-only management operations that are served through Gravitino no longer initialize native metadata. Operations requiring native metadata still use the operation session and propagate authentication failures. Explicit non-OAuth2 REST security modes no longer inherit Gravitino service OAuth2 properties. Explicitly configured REST properties remain effective. No configuration keys are added. This change does not add `OAUTH2_PASSTHROUGH` support to upstream Trino. ### How was this patch tested? - `./gradlew spotlessApply :trino-connector:trino-connector:test -PskipITs`: passed; 330 tests, 0 failures, 1 skipped, including 10 new regression tests. - `./gradlew :trino-connector:trino-connector:javadoc -PskipITs`: passed with existing missing-comment warnings. - `git diff --check`: passed. - JaCoCo emitted JDK instrumentation compatibility warnings; coverage may be incomplete. - No Starburst integration tests were run as part of this port. -- 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]
