bharos opened a new issue, #12427:
URL: https://github.com/apache/gravitino/issues/12427
### What happened?
`IcebergRESTS3TokenAuthorizationIT` and `IcebergRESTGCSTokenAuthorizationIT`
fail immediately when run with `-PtestMode=deploy`. Running the GCS one against
a real bucket:
```
org.apache.iceberg.exceptions.ServiceFailureException: Server error: null
at RESTSessionCatalog.fetchConfig(RESTSessionCatalog.java:1337)
at
IcebergAuthorizationIT.initAdminIcebergCatalog(IcebergAuthorizationIT.java:261)
at IcebergRESTGCSTokenAuthorizationIT.startIntegrationTest(...:66)
```
The same test passes in embedded mode, so this is specific to deploy.
There are two causes:
1. `setupCloudBundles()` is called after `super.startIntegrationTest()`. The
server resolves its `FileIO` from the classpath while starting, so the bundle
arrives too late and `/v1/config` returns 500.
2. The bundle is installed only into `iceberg-rest-server/libs/`. The
`lakehouse-iceberg` catalog is loaded through `IsolatedClassLoader` from
`catalogs/lakehouse-iceberg/libs/`, which ships `iceberg-aws` / `iceberg-gcp`
without the cloud SDK, so `FileIO` resolves and then fails with
`NoClassDefFoundError`. Both directories are needed, as described in
`gravitino-server-config.md` and `credential-vending.md`.
Neither test drops `SCHEMA_NAME`, so it also leaks into sibling Iceberg ITs.
This went unnoticed because these tests have only ever been run in embedded
mode, where `setupCloudBundles()` returns early and the bundle code never
executes.
### How to reproduce
```
export GRAVITINO_TEST_CLOUD_IT=true
export GRAVITINO_GCS_BUCKET=<bucket> && export
GRAVITINO_GCS_PATH_PREFIX=<prefix>
./gradlew compileDistribution -PskipWeb=true -x test
./gradlew :iceberg:iceberg-rest-server:test --tests
"*IcebergRESTGCSTokenAuthorizationIT" \
-PskipTests -PtestMode=deploy -PskipDockerTests=false
```
### Fix
Both changes are already validated in `IcebergRESTMinIOTokenAuthorizationIT`
(#12410). Verified against GCS: deploy failed before the fix and passes 3/3
after. The S3 equivalent is unverified, since running it needs an AWS account
with an assumable role.
--
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]