paiqo / Databricks-VSCode

VSCode extension to work with Databricks
GNU General Public License v3.0
123 stars 27 forks source link

Authentication Prompt missing? #129

Closed Charliux closed 1 year ago

Charliux commented 1 year ago

First of all, thanks for working on this extension, it is awesome.

Now my problem, whenever I try to run a simple python code (5 lines) against one of the databricks clusters, it just stays there running forever.

When I run this on Databricks, I get the following authentication prompt: image

Once I go to that link and enter the code, my code continues running.

I believe my code hangs on VSCode is because it is waiting for this prompt, but can't find it anywhere. Any idea?

gbrueckl commented 1 year ago

could you please share some more information on your environment? which OS are you using? (Win, Linux, Mac) where is your Databricks workspace hosted? (Azure, GCP, AWS)

Since you get a prompt for a login, I guess you are on Azure using the Azure Connection Manager?

Charliux commented 1 year ago

My environment is Windows10, Databricks is hosted in Azure.

I only get the prompt for a login whenever I am in the databricks environment but not in VS Code.

When I try to use the Connection Manager with Azure selected, it never connects to Databricks. image

When I use VS Code Settings it does connect. image

and can run python code on the cluster. The problem I am having is happening when I try to connect to an internal database and don't get that login prompt (which i do get whenever I run the same code in the Databricks environment)

gbrueckl commented 1 year ago

so the only time you should get prompted in the Databricks Web UI is at the very beginning when opening the site the first time but definitely not when executing a notebook

can you share some of the code that you use to "connect to an internal database"?

Charliux commented 1 year ago

This is the code, we use an internal library to facilitate the connection to that database.

image

in the screenshot here (running on DB) you can see I get the prompt. Once I go the URL and enter the code the code runs.

When I try this in VSCode, it keeps running until it times out. My thinking is that it is waiting for that prompt which I never get.

gbrueckl commented 1 year ago

not sure but it seems like this code then only shows the message/popup where it actually runs. In our extensions we are just sending the plain python code to the Databricks cluster to execute it there so the message/popup might not be displayed properly (or at all) in VSCode

not sure if we can do anything about this

gbrueckl commented 1 year ago

closing as this cannot be fixed by the extension and the way it works (running Databricks Execution APIs which cannot create a pop up)