EXPORT failing due to temp files cleanup issue in Windows
2023-02-13 18:20:49 [INFO] Run Id: cd40dac9-d9d9-4f12-b887-5078f4729f3c 2023-02-13 18:20:49 [INFO] Run Summary: 2023-02-13 18:20:49 [INFO] ============ 2023-02-13 18:20:49 [INFO] ╒════╤═════════════════════╤════════════════════╤═════════════════╤══════════════════════╤═══════════════════╕ │ │ object_type │ export_succeeded │ export_failed │ validate_succeeded │ validate_failed │ ╞════╪═════════════════════╪════════════════════╪═════════════════╪══════════════════════╪═══════════════════╡ │ 0 │ databricks_notebook │ 2 │ 0 │ 0 │ 2 │ ╘════╧═════════════════════╧════════════════════╧═════════════════╧══════════════════════╧═══════════════════╛ 2023-02-13 18:20:49 [INFO] 2023-02-13 18:20:49 [INFO] Run Errors Summary: 2023-02-13 18:20:49 [INFO] =================== 2023-02-13 18:20:49 [INFO] ╒════════════╤═══════╤═════════════╕ │ err_type │ msg │ err_count │ ╞════════════╪═══════╪═════════════╡ ╘════════════╧═══════╧═════════════╛ Traceback (most recent call last): File "D:\Users\username\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 613, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] Access is denied: 'D:\Users\username\AppData\Local\Temp\tmpqdvu_qnu\.git\objects\pack\pack-a6e7ae45a0f17a8d8ca6af57587ce71016431626.idx' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\Users\username\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 801, in onerror _os.unlink(path) PermissionError: [WinError 5] Access is denied: 'D:\Users\username\AppData\Local\Temp\tmpqdvu_qnu\.git\objects\pack\pack-a6e7ae45a0f17a8d8ca6af57587ce71016431626.idx' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\Users\username\AppData\Local\Programs\Python\Python39\Scripts\databricks-sync-script.py", line 11, in
Is is related to an open Issue? https://github.com/databrickslabs/databricks-sync/issues/122
and is this a valid fix? https://stackoverflow.com/questions/1889597/deleting-read-only-directory-in-python/1889686#1889686
This is only happening with git push with local repo, the export is successful