Asset bundles sync don't follow .gitignore pattern syntax for root folders
Describe the issue
The sync: include: configuration of asset bundles don't respect leading slash / as .gitignore does:
From git docs (my highlight):
- The slash "/" is used as the directory separator. Separators may occur at the beginning, middle or end of the .gitignore search pattern.
- If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular .gitignore file itself. Otherwise the pattern may also match at any level below the .gitignore level.
I wanted to force an include a folder present in the root of my repo, but all folders named the same (inside other .gitignored folders) were included in the sync.
Configuration
File tree
.
├── ignored
│ └── my_folder
└── my_folder
databricks.yml
sync:
include:
- /my_folder/
.gitignore
/ignored
/my_folder
Result: both my_folder gets uploaded to Databricks workspace
Steps to reproduce the behavior
- Prepare files as above
- Run
databricks bundle deploy - See error
Expected Behavior
Only the my_folder in the root of the repo should be synced.
Actual Behavior
All folders named my_folder are synced.
OS and CLI version
Linux 6.6.87.2-microsoft-standard-WSL2 Databricks CLI v0.260.0
Is this a regression?
I haven't tested
Debug Logs
–
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
I find this still relevant, the bot wants me to comment.