unitycatalog / unitycatalog/unitycatalog

Delta GET /delta/v1/config ignores protocol-versions and never negotiates / rejects per spec

Open
#1,785 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3.5k
Forks
672
Avg merge
6d 16h
Merged PRs (30d)
30

Description

Describe the bug

GET /delta/v1/config ignores the protocol-versions query parameter and unconditionally returns "protocol-version": "1.0". DeltaApiService.getConfig on main:

// For now, we only have 1.0 as the first protocol version. Input protocolVersions is ignored.
return new DeltaCatalogConfig().endpoints(ENDPOINTS).protocolVersion("1.0");

But spec/protocols/ManagedTablesSpec.md (§ Get Configuration) and api/delta.yaml both define this endpoint as the protocol's version-negotiation bootstrap:

  • protocol-versions is required: "Comma-separated list of the highest protocol versions the client supports per major version (e.g., "1.1,2.3" means the client supports 1.0-1.1 and 2.0-2.3)."
  • "The server selects the highest mutually supported version and returns endpoints for that version."
  • "If the client and server share no protocol version, the server rejects the request with InvalidParameterValueException (400) and an error message naming the protocol versions it supports. The client should treat this like an unsupported server."

None of that is enforced today. The server accepts a missing parameter, a malformed one, or a version it does not implement, and answers 200 / "1.0" in every case — so a client that only speaks a hypothetical 2.x would be told the server negotiated 1.0 and go on to call /v1/... endpoints with 2.x semantics, instead of getting the spec'd 400 and falling back.

To Reproduce

Against a server on main with a catalog unity:

$ curl -s "http://localhost:8080/api/2.1/unity-catalog/delta/v1/config?catalog=unity"
{"endpoints":[...],"protocol-version":"1.0"}          # expected 400: parameter is required

$ curl -s "http://localhost:8080/api/2.1/unity-catalog/delta/v1/config?catalog=unity&protocol-versions=2.0"
{"endpoints":[...],"protocol-version":"1.0"}          # expected 400 InvalidParameterValueException naming "1.0"

$ curl -s "http://localhost:8080/api/2.1/unity-catalog/delta/v1/config?catalog=unity&protocol-versions=garbage"
{"endpoints":[...],"protocol-version":"1.0"}          # expected 400

Expected behavior

Per the spec:

protocol-versions Response
1.0, 1.3, 1.0,2.0 (any list whose major-1 cap is ≥ 1.0) 200, protocol-version: "1.0"
missing / blank 400 INVALID_PARAMETER_VALUE, message names the parameter and the versions the server supports
malformed entry (1, abc, 1.0,) 400 INVALID_PARAMETER_VALUE
no overlap (2.0, 0.9) 400 INVALID_PARAMETER_VALUE, message names the versions the server supports (1.0)

System [please complete the following information]:

  • main at 958fded, also present in v0.5.0 / v0.5.1

Additional context

Only one protocol version (1.0) exists today, so this has no effect on current Delta clients — but that is exactly why it is cheap to get right now: enforcing the required parameter and the 400 path before a 1.1/2.0 ever ships means no client is ever built against the lenient behaviour. I have a fix + tests ready and will open a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DeltaApiService.getConfig and compare its handling of protocolVersions with § Get Configuration in spec/protocols/ManagedTablesSpec.md and api/delta.yaml. Verify the required, malformed, and unsupported-version cases described in the issue, including the successful 1.0 negotiation and the specified 400 responses. Done means validation and coverage match the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.