Describe the issue
When pointing a bundle's sync.paths field outside of the bundle root, and if that traverses outside of the git folder root, databricks bundle validate returns with an error Error: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"
However, when pointing to a sync.paths folder that traverses outside of the bundle root when NOT in a git folder, it works as expected.
Configuration
# databricks.yml
bundle:
name: sync-paths-root-test
sync:
paths:
- .
- ../repo-sibling/
Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
- Create a databricks bundle in a git folder
- Create a databricks.yml in the root of the git folder and point sync.paths to a folder outside of the repo root
- Run
databricks bundle validate and you will see the error output
Do the same steps but create the bundle in step #1 in a non-git folder. You will not get an error
Expected Behavior
I expect the bundle to validate even when sync.paths traverses outside the Git repository root.
This works when the bundle is located in a non-Git build directory and the bundle folder and dependency folder are siblings. In that pipeline setup, databricks bundle validate succeeds.
However, local validation fails when sync.paths references files outside the Git repository root.
We maintain shared helper scripts in a separate repository from our DABs projects. Based on the documentation, sync.paths should allow those scripts to be included in the bundle deployment. The behavior appears inconsistent depending on whether the bundle is validated inside a Git repository.
Actual Behavior
i receive an error Error: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"
OS and CLI version
Databricks CLI: v1.9.0
OS: Ubuntu 24.04/25.04, Windows 11
Is this a regression?
No
Describe the issue
When pointing a bundle's
sync.pathsfield outside of the bundle root, and if that traverses outside of the git folder root,databricks bundle validatereturns with an errorError: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"However, when pointing to a sync.paths folder that traverses outside of the bundle root when NOT in a git folder, it works as expected.
Configuration
Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
databricks bundle validateand you will see the error outputDo the same steps but create the bundle in step #1 in a non-git folder. You will not get an error
Expected Behavior
I expect the bundle to validate even when
sync.pathstraverses outside the Git repository root.This works when the bundle is located in a non-Git build directory and the bundle folder and dependency folder are siblings. In that pipeline setup,
databricks bundle validatesucceeds.However, local validation fails when
sync.pathsreferences files outside the Git repository root.We maintain shared helper scripts in a separate repository from our DABs projects. Based on the documentation,
sync.pathsshould allow those scripts to be included in the bundle deployment. The behavior appears inconsistent depending on whether the bundle is validated inside a Git repository.Actual Behavior
i receive an error
Error: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"OS and CLI version
Databricks CLI: v1.9.0
OS: Ubuntu 24.04/25.04, Windows 11
Is this a regression?
No