Skip to content

[Bug report] The API for creating an Iceberg catalog has a deprecated parameter "warehouse" that is required in the HTTP payload #5756

Description

@liuchunhao

Version

main branch

Describe what's wrong

The property key warehouse was removed with rest assigned as a catalog-backend on Web UI, but REST API call for creating a catalog still requires warehouse in the request body and missing warehouse in the HTTP request body will cause the exception below.

No option warehouse provided with restcatalog-backend on Web UI
image

POST http://localhost:8090/api/metalakes/test/catalogs

{
  "name": "1",       
  "type": "relational", 
  "provider": "lakehouse-iceberg",
  "comment": "",      
  "properties": {
    "uri": "1",
    // "warehouse": "",   // Why is this a required property ?
    "catalog-backend": "rest",
    "authType": "simple"
  }
}

API call without “warehouse” causes the exception below:

{
    "code": 1001,
    "type": "IllegalArgumentException",
    "message": "Failed to operate catalog(s) [100] operation [CREATE] under metalake [test], reason [Properties are required and must be set: [warehouse]]",
    "stack": [
        ...
     ]
}

Error message and/or stacktrace

{
    "code": 1001,
    "type": "IllegalArgumentException",
    "message": "Failed to operate catalog(s) [100] operation [CREATE] under metalake [test], reason [Properties are required and must be set: [warehouse]]",
    "stack": [
        ...
     ]
}

How to reproduce

Create a test metalake and then create a catalog by sending the request without warehouse to the REST API as follows :

POST http://localhost:8090/api/metalakes/test/catalogs

{
  "name": "1",       
  "type": "relational", 
  "provider": "lakehouse-iceberg",
  "comment": "",      
  "properties": {
    "uri": "1",
    "catalog-backend": "rest",
    "authType": "simple"
  }
}

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions