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

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `GravitinoClient.close()` and `GravitinoAdminClient.close()` send an HTTP 
`CLOSE /` request. Gravitino has no close endpoint, so the server rejects the 
request and the client raises before closing its authentication data provider.
   
   The problem is in `clients/client-python/gravitino/utils/http_client.py`: 
`HTTPClient.close()` calls `_request("close", "/")`.
   
   The same behavior is present in Python client versions 1.3.0 and 1.3.1.
   
   ### Error message and/or stacktrace
   
   ```text
   gravitino.exceptions.base.UnknownError: Unknown error handler NoneType, 
error response body: ErrorResponse(code=1000, type=RESTException, message=Bad 
Request)
   ```
   
   ### How to reproduce
   
   ```python
   from gravitino import GravitinoClient
   from gravitino.auth.basic_auth_provider import BasicAuthProvider
   
   client = GravitinoClient(
       uri="https://<gravitino-host>",
       metalake_name="metalake",
       auth_data_provider=BasicAuthProvider("admin", "<password>"),
   )
   client.list_catalogs()
   client.close()
   ```
   
   The `close()` call sends `CLOSE /` and raises `UnknownError`.
   
   ### Additional context
   
   `close()` should release local resources and close the authentication data 
provider without sending a request to the server. The Java client already 
behaves this way.
   


-- 
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