FANNG1 opened a new pull request, #12844:
URL: https://github.com/apache/gravitino/pull/12844
### What changes were proposed in this pull request?
Add a Gravitino-private catalog discovery endpoint to the Iceberg REST
server:
`GET /iceberg/gravitino/v1/management/catalogs`
This change:
- Returns catalog names accepted by the server `warehouse` parameter.
- Supports both static and dynamic Iceberg configuration providers.
- Filters dynamic results to `lakehouse-iceberg` catalogs.
- Adds a backward-compatible `IcebergConfigProvider#listCatalogs()` SPI.
- Returns deterministic, deduplicated catalog names.
- Keeps the endpoint behind the existing Iceberg REST authentication filter.
- Adds provider, response, authentication, and endpoint tests.
The endpoint intentionally does not apply per-catalog authorization
filtering.
### Why are the changes needed?
Compute engines currently cannot ask an Iceberg REST server which catalogs
it serves. This forces users to maintain per-catalog engine configuration and
update it whenever catalogs change.
The new endpoint provides the server-authoritative catalog list required by
engine-side automatic discovery.
Fix: #12524
### Does this PR introduce _any_ user-facing change?
Yes.
The Iceberg REST server exposes a new private management endpoint:
`GET {iceberg-rest-base}/gravitino/v1/management/catalogs`
The `IcebergConfigProvider` SPI also gains a backward-compatible
`listCatalogs()` method.
### How was this patch tested?
- `./gradlew :iceberg:iceberg-rest-server:spotlessCheck`
- Targeted 43 Iceberg REST endpoint, provider, and authentication tests
- `git diff --check`
The full module test suite was attempted, but existing
`TestIcebergCleanupJobStoreBackend` MySQL and PostgreSQL cases could not
connect to their containers because the local SOCKS proxy intercepted the
connections.
### Draft follow-up
- Document the endpoint in `docs/iceberg-rest-service.md` before marking the
PR ready.
--
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]