databricks/databricks-vscode

[BUG] Extension does not recognize custom databricks domains

s4m0r4m4 opened this issue · 14 comments

Describe the bug
I cannot configure the extension for a databricks URL hosted on my company's domain.

To Reproduce
Steps to reproduce the behavior:

  1. Open up VS Code, install Databricks extension
  2. In the databricks extension window, click "Configure Databricks"
  3. Enter the URL for your company-internal databricks, example: databricks-test.my-company.com
  4. See error: Not a databricks host

Screenshots

image

System information:

  1. Paste the output ot the Help: About command (CMD-Shift-P).
Version: 1.70.0 (user setup)
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-04T04:38:16.462Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19045
  1. Databricks Extension Version (v0.3.8)

Databricks Extension Logs
Please attach the databricks extension logs

Additional context
Add any other context about the problem here.

Hi @s4m0r4m4. Thanks for reporting this bug. We overlooked this. We will try to patch this by the next version.

Here's the culprit: https://github.com/databricks/databricks-vscode/blob/main/packages/databricks-vscode/src/utils/urlUtils.ts#L25-L27

I would propose that we simply remove that validation check - in my opinion the plugin should not make any assumptions/requirements about the hostname that databricks is running on.

If we're in agreement I can yank it out.

@kartikgupta-db - checking in to see if you're onboard with my proposed approach above ^. If so I can open a PR

@s4m0r4m4 We still need this piece of code, but we are adding a fallback if it is not one of the known domains.
Edit: Updated the code so it is not a dependency anymore. We should be able to remove it in the next release.