databricks-cli/docs/release_notes/workspace_prefix.md

18 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## /Workspace prefix
This PR (https://github.com/databricks/cli/pull/1724) introduced the following changes:
1. Default remote bundle paths became automatically prefixed with /Workspace prefix
2. All usage of path strings like `/Workspace/${workspace.root_path}/...` and etc. in bundle configuration now automatically replaced with `${workspace.root_path}/...` and generates a warning as part of `bundle validate`
If users have specified a custom `workspace.{root,artifact,file,state}_path`, then DABs will automatically ensure it is prefixed with /Workspace.
This also means that if they use any of these as variables (for example, `my_config_path: /Workspace/${workspace.file_path}/config`), then theyll need to update those entries to remove the `/Workspace` prefix to avoid the warning.
If they pass along one of these as variables and prefix them in their code, theyll need to update their code to no longer do this.
The reason for this is the following:
Historically, the workspace file system was rooted at `/`, with home directories under `/Users`, for example.
To access workspace paths through the API you would use these paths directly. To access workspace paths from your code, you could use the `/Workspace` file path that mounts the workspace file system on Databricks clusters. Home directories were available under `/Workspace/Users`. This duality proved inconvenient, and with the introduction of UC volumes it even became ambiguous (UC volumes are accessible under `/Volumes` ). To avoid both the duality of workspace paths and as well as ambiguity between workspace paths and UC volume paths, were now prefixing all workspace paths with `/Workspace`. This means they no longer need to be manually prefixed to be used as a POSIX path (e.g. to open a file from Python), nor is there ambiguity between workspace paths and UC volume paths.