Skip to content

[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
cherry-pick-706e40cd-to-branch-1.2
Apr 3, 2026
Merged

[Cherry-pick to branch-1.2] [#10640] fix(iceberg): Remove prefix from config endpoint per Iceberg REST spec (#10652)#10666
jerryshao merged 1 commit intobranch-1.2from
cherry-pick-706e40cd-to-branch-1.2

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot commented Apr 3, 2026

Cherry-pick Information:

  • Original commit: 706e40c
  • Target branch: branch-1.2
  • Status: ✅ Clean cherry-pick (no conflicts)

… 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`
@github-actions github-actions bot requested a review from jerryshao April 3, 2026 02:08
@roryqi roryqi closed this Apr 3, 2026
@roryqi roryqi reopened this Apr 3, 2026
@jerryshao jerryshao merged commit 1a9c113 into branch-1.2 Apr 3, 2026
26 checks passed
@jerryshao jerryshao deleted the cherry-pick-706e40cd-to-branch-1.2 branch April 3, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants