bharos opened a new pull request, #12428:
URL: https://github.com/apache/gravitino/pull/12428
### What changes were proposed in this pull request?
Makes the cloud credential vending ITs work in deploy mode.
- `setupCloudBundles()` now runs before `super.startIntegrationTest()`,
because the server resolves its `FileIO` from the classpath while starting.
- The bundles are installed into `catalogs/lakehouse-iceberg/libs/` as well
as `iceberg-rest-server/libs/`. The catalog is loaded through
`IsolatedClassLoader` and ships `iceberg-aws` / `iceberg-gcp` without the cloud
SDK, so `FileIO` resolved and then failed with `NoClassDefFoundError`. Both
bundles now come from the local build, so nothing is downloaded from Maven
Central.
- Both tests drop `SCHEMA_NAME` on teardown, so they no longer leak into
sibling Iceberg ITs.
GCS needs two jars per directory, since `bundles/iceberg-gcp-bundle` does
not shade `bundles/gcp`; the AWS bundle already shades `bundles/aws`, so one
jar is enough there.
### Why are the changes needed?
Both tests fail immediately under `-PtestMode=deploy`. They pass in embedded
mode, where `setupCloudBundles()` returns early and the bundle code never runs,
which is why this was not noticed.
Fix: #12427
### Does this PR introduce _any_ user-facing change?
No. Test only.
### How was this patch tested?
GCS, against a real bucket:
```
export GRAVITINO_TEST_CLOUD_IT=true
export GRAVITINO_GCS_BUCKET=<bucket> && export
GRAVITINO_GCS_PATH_PREFIX=<prefix>
./gradlew :iceberg:iceberg-rest-server:test --tests
"*IcebergRESTGCSTokenAuthorizationIT" \
-PskipTests -PtestMode=deploy -PskipDockerTests=false
```
| Mode | Before | After |
| --- | --- | --- |
| embedded | 3 pass | 3 pass |
| deploy | `ServiceFailureException` at `initAdminIcebergCatalog` | 3 pass |
The S3 change is identical but unverified, since running that test needs an
AWS account with an assumable role. Both tests stay gated behind
`GRAVITINO_TEST_CLOUD_IT`, so neither runs in CI.
--
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]