databricks/databricks-vscode

[BUG] Repos pointing at Github rather than Gitlab

markderry opened this issue · 2 comments

I am attempting to work with a private Gitlab instance in our corporate network. We have a proxy setup to access the Gitlab repo from Databricks. The Databricks repos function works well inside of Databricks through the proxy. I have registered my credentials under the Gitlab provider in the User Settings in Databricks.

When I attempt to create a new repo under the Databricks extension in VSCode under the sync destination I get the following error:

Error while creating a new directory: {"error_code":"PERMISSION_DENIED","message":"Missing Git provider credentials. Go to User Settings > Git Integration to add your personal access token."}

When looking at the logs it seems that it is trying to access Github rather than Gitlab.

{"error":{"error":{"code":403,"message":"{\"error_code\":\"PERMISSION_DENIED\",\"message\":\"Missing Git provider credentials.
 Go to User Settings > Git Integration to add your personal access token.\"}","stack":"Error: 
{\"error_code\":\"PERMISSION_DENIED\",\"message\":\"Missing Git provider credentials. Go to User Settings > Git Integration to add your personal access token.\"}\n    
at ApiClient.request (c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:18715:126)\n    
at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    
at ReposService.create (c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:25505:16)\n    
at WorkspaceFsCommands.createRepo (c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:41225:5)\n    
at WorkspaceFsCommands.createFolder (c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:41204:19)\n    
at fn (c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:37190:29)\n    
at c:\\Users\\derrym\\.vscode\\extensions\\databricks.databricks-0.3.4-win32-x64\\out\\extension.js:37201:13"},"request":
{"body":"
{\"path\":\"/Repos/Mark.Derry@cenovus.com/test.ide\",\"provider\":\"github\",\"url\":\"https://github.com/databricks/databricks-empty-ide-project\"}",
"method":"POST"},"response":
"{\"error_code\":\"PERMISSION_DENIED\",\"message\":\"Missing Git provider credentials. Go to User Settings > Git Integration to add your personal access token.\"}"},

Describe the bug
Databricks VScode extension is not working with private gitlab instance. Unable to create a new repo or view existing repos.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Databricks extension
  2. Click on Sync Destinations settings
  3. Only option is to create a new Sync Destination
  4. Error while creating a new directory: {"error_code":"PERMISSION_DENIED","message":"Missing Git provider credentials. Go to User Settings > Git Integration to add your personal access token."}

System information:

  1. VSCode
    Version: 1.76.1 (user setup)
    Commit: 5e805b79fcb6ba4c2d23712967df89a089da575b
    Date: 2023-03-08T16:32:00.131Z
    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.17763
    Sandboxed: No
  2. Databricks Extension Version
    0.3.4

Hi @markderry. We are moving away from repos as the sync destination. Can you try using our new workspace sync destination feature and see if that fixes your issue? https://docs.databricks.com/dev-tools/vscode-ext.html#set-the-workspace-files-location

Workspace sync destination worked.