markhoerth / dremio_client

Apache License 2.0
31 stars 26 forks source link

Updates needed for newest Dremio version #224

Open JonathanWeinrib opened 3 years ago

JonathanWeinrib commented 3 years ago

Description

The dremio_client repo doesn't work with the latest verion of Dremio (15.0), as supported by dremio-hub/arrow-flight-client-examples.

It's probably necessary to update the flight authentication method similarly to how it was done in the dremio-hub example (I'm including a diff of that here as well) https://github.com/dremio-hub/arrow-flight-client-examples/commit/a08169c97ea6140ca93a78eb7dff2dfb04ef6eaa

I would really appreciate the help!!

What I Did

What I'm seeing is that the dremio_client still works with older versions of Dremio, but with Dremio 15.0 when I do:

from flight import connect
client = connect(hostname, port, user, pass)

I get the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/homes/jonathanw/.conda/envs/test-pdc/lib/python3.9/site-packages/dremio_client/flight/__init__.py", line 52, in connect
    c.authenticate(HttpDremioClientAuthHandler(username, password if password else ""))
  File "pyarrow/_flight.pyx", line 1155, in pyarrow._flight.FlightClient.authenticate
  File "pyarrow/_flight.pyx", line 66, in pyarrow._flight.check_flight_status
pyarrow._flight.FlightUnauthenticatedError: gRPC returned unauthenticated error, with message: 
rymurr commented 3 years ago

Hey @JonathanWeinrib you are correct, the library does need to be updated to support the newer flight features. I am kinda swamped at the moment so I likely won't have time to look at this. However I can give you pointers if you are interested in contributing.

JonathanWeinrib commented 3 years ago

Hi Ryan - thanks for the reply. Happy to contribute - would love any pointers!

rymurr commented 3 years ago

looking at the updated code in dremio-hub/arrow-flight-client-examples@a08169c it should be mostly a matter of copying that into the flight module here. Maybe a new auth type to support old flight plugins and new.