Fix WSFS extensions for cross-workspace deployments
When running DABS from within a Databricks workspace with files under /Workspace/, the CLI would incorrectly use WSFS extensions even when deploying to a different workspace. This caused "path does not exist" errors because it tried to read files from the current workspace while deploying to the target workspace.
The fix adds cross-workspace deployment detection by comparing the current workspace host (DATABRICKS_HOST env var) with the target workspace host from the bundle configuration. When hosts differ, WSFS extensions are skipped and the standard workspace files client is used instead.
This resolves customer issues where dynamically generated DABS configurations work within the same workspace but fail when targeting a different workspace.
🤖 Generated with Claude Code
Changes
Why
Tests
| Env | ✅pass | 🔄flaky | 🙈skip | |
|---|---|---|---|---|
| ✅ | aws windows | 309 | 502 | |
| ✅ | aws-ucws linux | 421 | 400 | |
| ✅ | aws-ucws windows | 422 | 399 | |
| 🔄 | azure linux | 305 | 3 | 502 |
| 🔄 | azure windows | 305 | 4 | 501 |
| ✅ | azure-ucws linux | 421 | 399 | |
| ✅ | azure-ucws windows | 422 | 398 | |
| 🔄 | gcp linux | 303 | 4 | 504 |
| ✅ | gcp windows | 308 | 503 |
10 failing tests:
| Test Name | azure linux | azure windows | gcp linux |
|---|---|---|---|
| TestAccept | 🔄flaky | ✅pass | ✅pass |
| TestAccept/bundle/deploy/pipeline/allow-duplicate-names/DATABRICKS_CLI_DEPLOYMENT=direct-exp | ✅pass | 🔄flaky | ✅pass |
| TestAccept/bundle/deploy/pipeline/allow-duplicate-names/DATABRICKS_CLI_DEPLOYMENT=terraform | ✅pass | 🔄flaky | ✅pass |
| TestAccept/bundle/deploy/pipeline/auto-approve | ✅pass | 🔄flaky | ✅pass |
| TestAccept/bundle/deploy/pipeline/auto-approve/DATABRICKS_CLI_DEPLOYMENT=direct-exp | ✅pass | 🔄flaky | ✅pass |
| TestAccept/bundle/resources/pipelines/update/DATABRICKS_CLI_DEPLOYMENT=direct-exp | ✅pass | ✅pass | 🔄flaky |
| TestAccept/bundle/resources/pipelines/update/DATABRICKS_CLI_DEPLOYMENT=terraform | ✅pass | ✅pass | 🔄flaky |
| TestAccept/bundle/templates/default-python/integration_classic | 🔄flaky | ✅pass | 🔄flaky |
| TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_CLI_DEPLOYMENT=terraform/UV_PYTHON=3.10 | 🔄flaky | ✅pass | ✅pass |
| TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_CLI_DEPLOYMENT=terraform/UV_PYTHON=3.13 | ✅pass | ✅pass | 🔄flaky |
This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled.