databricks/databricks-vscode

[Question] Connected to Databricks Workspace but unable to sync workspace folder destination

Mpicca opened this issue · 5 comments

Mpicca commented

Describe the bug
When attempting to sync to any folder in my workspace explorer i receive the following error:

logger: 'Extension',
operationId: undefined,
operationName: undefined,
loggingFunction: undefined,
timestamp: 1682639326027,
error: {
stack: 'Error: Local file URI scheme must be file. Found dbws (\)\n' +
' at new LocalUri (c:\Users\matti\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:38071:19)\n' +
' at ConnectionManager.attachSyncDestination (c:\Users\matti\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:39838:35)\n' +
' at WorkspaceFsCommands.attachSyncDestination (c:\Users\matti\.vscode\extensions\databricks.databricks-0.3.7-win32-x64\out\extension.js:42693:5)\n' +
' at m.h (c:\Users\matti\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:125789)',
message: 'Local file URI scheme must be file. Found dbws (\)'
},
level: 'error',
message: 'Attach Sync Destination error'

To Reproduce
Steps to reproduce the behavior:

  1. In workspace explorer, hover over folder, right click and click "Attach folder as sync destination"
  2. Does not sync and Output shows error above.

Screenshots
If applicable, add screenshots to help explain your problem.

System information:

Databricks Extension Version : 0.3.11

Hi @Mpicca. It doesn't seem that your update went through properly, because you still have databricks.databricks-0.3.7 in the logs.

We have removed right click and attach option from workspace explorer in the latest version due to issues with that option. You can attach a workspace folder by clicking the gear icon next to sync destination configuration item.
Screenshot 2023-04-28 at 11 03 59

Please give it a try and let us know if you are still having troubles.

Mpicca commented

okay I've update the extension, now receive the following output:

logger: 'Extension',
operationId: undefined,
operationName: undefined,
loggingFunction: undefined,
timestamp: 1682705292440,
error: {
stack: 'Error: Local file URI scheme must be file. Found dbws (\)\n' +
' at new LocalUri (c:\Users\matti\.vscode\extensions\databricks.databricks-0.3.11-win32-x64\out\extension.js:89856:19)\n' +
' at ConnectionManager.attachSyncDestination (c:\Users\matti\.vscode\extensions\databricks.databricks-0.3.11-win32-x64\out\extension.js:91755:35)',
message: 'Local file URI scheme must be file. Found dbws (\)'
},
level: 'error',
message: 'Local file URI scheme must be file. Found dbws (\)'
}
{
logger: 'Extension',
operationId: '5b58f20a-8f7c-4408-bd41-cd14d514b958',
operationName: 'DatabricksEnvFileManager.writeFile',
loggingFunction: 'DatabricksEnvFileManager.writeFile',
timestamp: 1682705169235,
error: {
stack: 'Error: EISDIR: illegal operation on a directory, read',
message: 'EISDIR: illegal operation on a directory, read',
errno: -4068,
code: 'EISDIR',
syscall: 'read'
},
level: 'error',
message: "Can't load .env file"

Hi @Mpicca. Are you trying to use this extension with Databricks Power Tools extension? We don't use dbws URIs but the Power Tools extension does. They also initialise a databricks workspace in the "Workspace Explorer" view of vscode. This might be causing us to pickup the wrong workspace.

If this is indeed the case, can you try either

  1. Closing the databricks workspace in the "Workspace Explorer", OR
  2. Uninstalling the power tools extension trying again with only installing this extension.
LvffY commented

Hi @kartikgupta-db

I think I have the same error. I had the « Databricks power tools » extension and tried with or without it it finally came to the same problem.

My behavior is the following :

  • Cloning a new repository
  • Setting up the sync (works at start)
  • Sync stop working with state "ERROR"
  • Unable to sync the directory again (even by changing the sync destination path)

Unfortunately, I wasn't able to see any error logs that could help us to debug. Which logs do you need (and how to access them) ?

Hi @LvffY. This is how you get logs https://docs.databricks.com/dev-tools/vscode-ext.html#send-usage-logs-to-databricks. If your logs contain sensitive data, you can ping me on linkedin and I can share my email.