-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
What happend
When accessing presto behind a HTTPS proxy, this python sdk won't work when trying to following up the nextUri from query statement. E.g., after creating a query, when following statement:
$ curl -k https://192.168.86.20:31947/v1/statement/queued/20200731_194504_00002_azxv3/y61f7c68358f1460750b1f4fca89c4b272c55d0b3/1
{"id":"20200731_194504_00002_azxv3","infoUri":"http://192.168.86.20:8080/ui/query.html?20200731_194504_00002_azxv3","nextUri":"http://192.168.86.20:8080/v1/statement/executing/20200731_194504_00002_azxv3/ya4b5bce0c6391da9d771a40df96d4723d2280b81/0","stats":{"state":"QUEUED","queued":true,"scheduled":false,"nodes":0,"totalSplits":0,"queuedSplits":0,"runningSplits":0,"completedSplits":0,"cpuTimeMillis":0,"wallTimeMillis":0,"queuedTimeMillis":29,"elapsedTimeMillis":381605,"processedRows":0,"processedBytes":0,"peakMemoryBytes":0,"spilledBytes":0},"warnings":[]}Notice that the nextUri does not starts with HTTPS.
As a consequence, the python client will fail since it tries to use the value of this nextUri directly:
presto-python-client/prestodb/client.py
Lines 337 to 340 in b87744e
| @property | |
| def next_uri(self): | |
| # type: () -> Text | |
| return self._next_uri |
Expected outcome
It should parse the value of nextUri then format it just like that for the statement url.
Metadata
Metadata
Assignees
Labels
No labels