Skip to content

Iceberg catalog: advertise supported endpoints in /v1/config #1762

Backlog

Description

@cmelchior

Problem

The Iceberg REST catalog's GET /v1/config returns defaults and overrides only, with no endpoints list (tenant-catalog.ts, and the upstream endpoints are dropped in rest-catalog-client.ts).

Clients that read endpoints use it to decide which calls a server supports. When it is missing, pyiceberg falls back to a default set, and that set includes three operations this catalog has no route for:

Operation Endpoint
Update namespace properties POST /v1/{prefix}/namespaces/{namespace}/properties
Rename table POST /v1/{prefix}/tables/rename
Register table POST /v1/{prefix}/namespaces/{namespace}/register

pyiceberg sends these requests anyway and turns the 404 into a not-found error. For example, update_namespace_properties raises NoSuchNamespaceError for a namespace that exists.

Proposal

Return endpoints from /v1/config, listing exactly the routes this catalog serves:

GET    /v1/{prefix}/namespaces
POST   /v1/{prefix}/namespaces
GET    /v1/{prefix}/namespaces/{namespace}
HEAD   /v1/{prefix}/namespaces/{namespace}
DELETE /v1/{prefix}/namespaces/{namespace}
GET    /v1/{prefix}/namespaces/{namespace}/tables
POST   /v1/{prefix}/namespaces/{namespace}/tables
GET    /v1/{prefix}/namespaces/{namespace}/tables/{table}
HEAD   /v1/{prefix}/namespaces/{namespace}/tables/{table}
POST   /v1/{prefix}/namespaces/{namespace}/tables/{table}
DELETE /v1/{prefix}/namespaces/{namespace}/tables/{table}

pyiceberg then raises NotImplementedError: Server does not support endpoint … before sending an unsupported request, for every client version.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions