[Cherry-pick to branch-1.2] [#10640] fix(iceberg): Remove prefix from config endpoint per Iceberg REST spec (#10652)#10666
Merged
jerryshao merged 1 commit intobranch-1.2from Apr 3, 2026
Conversation
… REST spec (#10652) ### What changes were proposed in this pull request? Removed the `prefix` path parameter from the Iceberg REST API config endpoint. The `@Path` annotation was changed from `/v1/{prefix:([^/]*/)?}config` to `/v1/config`, so the endpoint only accepts the `warehouse` query parameter for catalog resolution. ### Why are the changes needed? Per the [Iceberg REST catalog OpenAPI spec](https://github.com/apache/iceberg/blob/1a2a8a5ecc701629183405ca842f2d1eb23505ee/open-api/rest-catalog-open-api.yaml#L65), the config endpoint does not include a prefix parameter. The Iceberg creator (Ryan Blue) confirmed that "a prefix is not allowed for the config endpoint." The previous implementation incorrectly accepted prefix in the URL path. Fix: #10640 ### Does this PR introduce any user-facing change? Yes. Requests to `/v1/{prefix}/config` are now rejected (the prefix segment is no longer matched). Clients should use `/v1/config?warehouse=<catalog>` for catalog-specific configuration. ### How was this patch tested? - Converted parameterized tests to non-prefix versions (`testConfig`, `testConfigWithEmptyWarehouse`, `testConfigWithValidWarehouse`, `testConfigEndpointsContainViewOperations`) - Added `testConfigRejectsPrefixInUrl` to verify that requests with prefix in the URL are rejected (returns 500 via Jersey's `IcebergExceptionMapper`) - Removed prefix-specific tests that are no longer applicable (`testIcebergRestValidPrefix`, `testIcebergRestInvalidPrefix`) - All tests pass: `./gradlew :iceberg:iceberg-rest-server:test --tests TestIcebergConfig`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.2