dbx
dbx copied to clipboard
Windows change sync directory
Expected Behavior
I am running library on Windows. To sync project I wrote "dbx sync" command in ".sh" file. Then I have "sh.exe" in a different directory, basically I'm using "sh.exe" which is provided with a "git" installation. Now when I run the final command I see in the sync logs that the path to target directory is incorrect (see example below).
What command I'm running:
"C:\Program Files\Git\bin\sh.exe" scripts\dbfs_sync.sh
Logs show that there is a wrong target directory. Part of the target path contains a path to "sh" file:
Target base path: dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src
Current Behavior
Command that I run:
"C:\Program Files\Git\bin\sh.exe" scripts\dbfs_sync.sh
Logs show that there is a wrong target directory. Part of the target path contains a path to "sh" file:
Target base path: dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src
Full logs (with set -x on):
d:\blue_src\blue_customerone>"C:\Program Files\Git\bin\sh.exe" scripts\dbfs_sync.sh
+ cd 'D:\blue_src\blue_customerone'
+ dbx sync dbfs --dest /FileStore/blue_cvm/cvm_blue_src -s 'D:\blue_src\blue_customerone'
[dbx][2022-11-11 12:21:59.597] Syncing from D:\blue_src\blue_customerone
[dbx][2022-11-11 12:21:59.614] Ignoring patterns from D:\blue_src\blue_customerone\.gitignore
[dbx][2022-11-11 12:21:59.617] Including patterns from D:\blue_src\blue_customerone\.syncinclude
[dbx][2022-11-11 12:21:59.631] Target base path: dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src
[dbx][2022-11-11 12:21:59.638] Starting initial copy
[dbx][2022-11-11 12:21:59.957] Checking if any unmatched files/directories would be deleted
[dbx][2022-11-11 12:21:59.964] Creating dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src/conf
[dbx][2022-11-11 12:21:59.977] Creating dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src/dbc
[dbx][2022-11-11 12:21:59.981] Creating dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src/docs
[dbx][2022-11-11 12:21:59.985] Creating dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src/notebooks
[dbx][2022-11-11 12:21:59.991] Creating dbfs:C:/Program Files/Git/FileStore/blue_cvm/cvm_blue_src/scripts
Steps to Reproduce (for bugs)
Open Windows command prompt. Create an sh file somewhere with following text:
## scripts\dbfs_sync.sh :
dbx sync dbfs --dest /FileStore/blue_cvm/cvm_blue_src -s 'D:\blue_src\blue_customerone'
Run script using "sh.exe" provided with git installation:
"C:\Program Files\Git\bin\sh.exe" scripts\dbfs_sync.sh
Context
OS Name Microsoft Windows 10 Enterprise Version 10.0.19044 Build 19044
databricks Version 0.17.3 Python 3.8.13 Databricks eXtensions aka dbx, version ~> 0.8.3
Possible solution
Maybe it is possible to add support of following syntax^
dbx sync dbfs --dest dbfs:/FileStore/blue_cvm/cvm_blue_src -s 'D:\blue_src\blue_customerone'
Edited problem description, because I think it wasn't clear how to reproduce the problem.
hi @Sirorezka , thanks a lot for reporting the issue. @matthayes could you please take a look?