Bug in Asset Bundle Sync

max_eg
New Contributor II

I think I found a bug in the way asset bundles sync/ deploy, or at least I have a question if I understood it correctly. 

My Setup:

I have an asset bundle, consisting of a notebook nb1.py and a utils module utils.py.

nb1.py imports functions from utils.py. 

I develop locally, and push the bundle via dabaricks cli tool with "databricks bundle deploy" and "databricks bundle run". 

My Workflow:

1. I run the bundle

2. the job fails due to some reason, and I do some debugging in the notebook directly in the bundle folder in Databricks.

3. I find the error, which was located in the utils.py file, and adjust the utils.py file locally. At this point I have edited the utils.py file locally, and the nb1.py file in DBX.

4. I run "databricks bundle deploy" and "datarbicks bundle run"

5. I observed that my local changes in utils.py were successfully synced with the file in the online bundle, but the changes I did online in nb1.py were not overwritten (as I expected) by my unchanged local nb1.py file to remove the code I wrote for debugging.  

6. My workaround: Make a dummy change locally in nb1.py, by adding a line "print('hello world')", then deploy again, then the online nb1.py is identical to the local one again.

My question:

I guess this is due to the way the sync works - only looking for edits locally, and if any was found, the file is synced. Is this correct? 
Is there a better solution to my problem, as for example a cleaning of all files online before I deploy?

Thanks!