[BUG] Sync fails with empty ipynb notebook file
fjakobs opened this issue · 2 comments
Describe the bug
Sync fails when it tries to copy an invalid or empty ipynb
file.
To Reproduce
Steps to reproduce the behavior:
- In the terminal type
touch empty.ipynb
- Start code sync
- See error
System information:
-
Paste the output ot the
Help: About
command (CMD-Shift-P).
Version: 1.77.3 (Universal)
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:19:37.325Z (1 mo ago)
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: Yes -
Databricks Extension Version: 0.3.13
Databricks Extension Logs
{"level":"info","logger":"Bricks","message":"time=2023-05-15T16:28:33.137+02:00 level=DEBUG source=path.go:104 msg=\"Path /Repos/fabian.jakobs@databricks.com/ide-best-practices.ide has type repo (ID: 4487386506650005)\"","timestamp":1684160913137}
{"level":"info","logger":"Bricks","message":"Error: notebooks/foo.ipynb: error loading Jupyter notebook file: EOF","timestamp":1684160914144}
{"level":"info","logger":"Bricks","message":"time=2023-05-15T16:28:34.144+02:00 level=ERROR source=root.go:95 msg=\"failed execution\" exit_code=1 error=\"notebooks/foo.ipynb: error loading Jupyter notebook file: EOF\"","timestamp":1684160914145}
I suppose trying to upload an invalid ipynb won't work either, so we could exclude it from the list if it is invalid (per our heuristics). However, folks might break their head if they don't see an upload happening for an invalid file. It might be uncommon enough for debug logs to be good enough and that we don't need to do anything special. WDYT?
I think that's a good approach