liuchunhao opened a new issue, #5756:
URL: https://github.com/apache/gravitino/issues/5756

   ### 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
      <img width="473" alt="image" 
src="https://github.com/user-attachments/assets/2c1818aa-4b2e-41ac-b1e5-a4586f099b52";>
   
   
   POST 
[http://localhost:8090/api/metalakes/test/catalogs](http://localhost:3001/api/metalakes/test/catalogs)
   ```json
   {
     "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:
   ```json
   {
       "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
   
   ```json
   {
       "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](http://localhost:3001/api/metalakes/test/catalogs)
   ```json
   {
     "name": "1",       
     "type": "relational", 
     "provider": "lakehouse-iceberg",
     "comment": "",      
     "properties": {
       "uri": "1",
       "catalog-backend": "rest",
       "authType": "simple"
     }
   }
   ```
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to