databricks/databricks-vscode

[BUG] Unable to Configure Extension - 'Configure Databricks' has no effect.

SolAquae opened this issue · 14 comments

Describe the bug
Unable to configure extension. Clicking on the Configure Databricks button does nothing. Choose the Configure workspace command from the command pallet does nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Install the Databricks extension for Visual Studio Code Extension
  2. Click on the ext icon in the left hand toolbar
  3. Click 'Configure Databricks' Button
  4. Nothing happens. Note: Cog icon missing from configuration panel
  5. 'ctrl + shift + P' - Access command pallet
  6. Choose : Databricks : Configure Workspace
  7. Nothing happens

Screenshots
image

There's a number of uncaught errors
image

System information:

Version: 1.76.2 (user setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: Yes

Databricks Extension Version
Version : 0.3.7
Published 11/23/2022, 01:04:49
Last released 3/22/2023, 00:23:27
Identifier databricks.databricks

Databricks Extension Logs
Logs attached but empty.

Additional context
Coporate network. Databricks CLI working as expected. Databricks Connector for SQL Tools working without issue. No issues logging in using Azure CLI.

Hi @SolAquae . Can you try to fetch the extension logs and share those as well? They will be really helpful for debugging. https://docs.databricks.com/dev-tools/vscode-ext.html#send-usage-logs-to-databricks

The bricks-logs.json and sdk-and-extension-logs.json are empty.

Logs and Verbose are enabled.

image

I have installed and re-installed many times. One piece of logging I do have is the 'Databricks Logs.log' generated by vscode.

{
logger: 'Extension',
operationId: undefined,
operationName: undefined,
loggingFunction: undefined,
timestamp: 1679902747375,
error: {
stack: 'Error: spawn UNKNOWN\n' +
'\tat ChildProcess.spawn (node:internal/child_process:413:11)\n' +
'\tat spawn (node:child_process:720:9)\n' +
'\tat execFile (node:child_process:336:17)\n' +
'\tat node:child_process:243:21\n' +
'\tat node:electron/js2c/asar_bundle:5:3133\n' +
'\tat CliWrapper.getBundleSchema (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:37602:30)\n' +
'\tat generateBundleSchema (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:42914:34)\n' +
'\tat activate (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:43241:3)\n' +
'\tat async f.n (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:94:6818)\n' +
'\tat async f.m (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:94:6781)\n' +
'\tat async f.l (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:94:6238)',
message: 'spawn UNKNOWN',
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
},
level: 'error',
message: 'Failed to load bundle schema: '
}

I managed to get it to generate some logs with a fresh install of VSCode. I seems to only do this once. Subsequent re-installs of the extension don't generate any logs.

{
"level":"debug",
"logger":"Extension",
"message":"Metadata",
"metadata":{
"bricksArch":"windows_amd64",
"commitSha":"6fde109",
"packageName":"databricks",
"version":"0.3.7",
"vsixArch":"win32-x64"
},
"timestamp":1680269501164
}{
"error":{
"code":"UNKNOWN",
"errno":-4094,
"message":"spawn UNKNOWN",
"stack":"Error: spawn UNKNOWN\n\tat ChildProcess.spawn (node:internal/child_process:413:11)\n\tat spawn (node:child_process:720:9)\n\tat execFile (node:child_process:336:17)\n\tat node:child_process:243:21\n\tat node:electron/js2c/asar_bundle:5:3133\n\tat CliWrapper.getBundleSchema (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:37602:30)\n\tat generateBundleSchema (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:42914:34)\n\tat activate (c:\Users\sa\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:43241:3)\n\tat async E.n (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:6646)\n\tat async E.m (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:6609)\n\tat async E.l (c:\Users\sa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:6066)",
"syscall":"spawn"
},
"level":"error",
"logger":"Extension",
"message":"Failed to load bundle schema: ",
"timestamp":1680269501176
}

sdk-and-extension-logs.txt

Hi. Thanks for this. This is a very consistent failure with bundle schema generation. We will push a fix for this soon.

While trying to set up the Databricks extension, pressing "Configure Databricks" doesn't open the Command Palette for populating the workspace URL in organization managed machines(Surface Pros and Azure Virtual Desktops).

MicrosoftTeams-image (42)

However, no output error message is reflected from the extension.

Also, manually created an Azure Databricks configuration profiles file and pointed the location of the file on VS Code extension, both-user and workspace settings.

As per my understanding, the above step only allows to override location of .databrickscfg file but doesn’t necessarily configure the Databricks workspace completely and/or allows to connect to a cluster. 

Referred the Databricks documentation(https://learn.microsoft.com/en-gb/azure/databricks/dev-tools/vscode-ext) and validated that all the prerequisites including configuration support for Files in Repos are met to work with the Databricks extension in VS Code.

MicrosoftTeams-image (43)

I'm experiencing the same issue, just wondering whether there are any updates?

This is on a quite heavily IT-managed Windows system, so some kind of file access issue could be at play.

Any updates?

File access could indeed be the issue here. But that should have lead to some sort of errors in vscode. Do any of you see an error, maybe in the extension host panel?

cc @fjakobs if you have any ideas here?

@kartikgupta-db

The extension host panel has the following details for the error:

2023-06-19 08:22:29.476 [error] Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:413:11)
    at spawn (node:child_process:720:9)
    at execFile (node:child_process:336:17)
    at node:child_process:243:21
    at node:electron/js2c/asar_bundle:5:3133
    at CliWrapper.listProfiles (c:\Users\first.last\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:37557:23)
    at async listProfiles (c:\Users\first.last\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:39332:21)
    at async inputHost (c:\Users\first.last\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:39229:22)
    at async MultiStepInput.stepThrough (c:\Users\first.last\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:38976:16)

Thanks for looking into this!

@jkfulton this error usually occurs when vscode does not have permissions to execute binaries. The extension internally uses our CLI. We execute the CLI as a shell subprocess.

Can you verify if you can directly call the cli from a vscode terminal?

First update to the latest version of the extension (>=0.3.15)
Then try
databricks -v

or if that doesn't work, maybe try the full path to the binary

c:\Users\first.last\.vscode\extensions\databricks.databricks-0.3.15/bin/databricks -v

At the same time, I will make sure that these errors are more visible in future releases.

This seems likely to be the problem -- console is reporting "blocked by group policy" -- I will get IT to add that to the group policy and let you know the results.

Thanks again -- echoing this error message to a user-facing dialog or logfile is probably the best fix, as a number of users seem to be running this in a managed environment. IT will whitelist stuff like this, but not if you don't know what to ask for!

Thanks for the feedback. The latest version should already be showing UI dialogs for this and many other errors. So it should not be silent anymore.