Skip to content

Fix handling of bare DATABRICKS_HOST environment variables#252

Merged
hadley merged 1 commit into
tidyverse:mainfrom
atheriel:fix-bare-databricks-host-handling
Jan 15, 2025
Merged

Fix handling of bare DATABRICKS_HOST environment variables#252
hadley merged 1 commit into
tidyverse:mainfrom
atheriel:fix-bare-databricks-host-handling

Conversation

@atheriel

Copy link
Copy Markdown
Collaborator

Some environments (e.g. Workbench) set DATABRICKS_HOST to the bare hostname and omit the HTTPS prefix; this breaks when we later expect it to be an actual URL.

So this commit updates databricks_workspace() to handle both cases. Similar code exists in all of the other Databricks packages and SDKs that I am aware of, so this is nothing new; I just missed it.

Unit tests are included.

Some environments (e.g. Workbench) set `DATABRICKS_HOST` to the bare
hostname and omit the HTTPS prefix; this breaks when we later expect it
to be an actual URL.

So this commit updates `databricks_workspace()` to handle both cases.
Similar code exists in all of the other Databricks packages and SDKs
that I am aware of, so this is nothing new; I just missed it.

Unit tests are included.

Signed-off-by: Aaron Jacobs <aaron.jacobs@posit.co>
@hadley hadley merged commit 2ced774 into tidyverse:main Jan 15, 2025
@atheriel atheriel deleted the fix-bare-databricks-host-handling branch January 15, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants