databricks-cli/libs/notebook/testdata
shreyas-goenka 75d516939b
Error out if notebook file does not exist locally (#261)
Adds check for whether file exists locally

case 1: local (relative) file does not exist
```
    foo:
      name: "[job-output] test-job by shreyas"

      tasks:
        - task_key: my_notebook_task
          existing_cluster_id: ***
          notebook_task:
            notebook_path: "./doesnotexist"
```
output:
```
shreyas.goenka@THW32HFW6T job-output % bricks bundle deploy
Error: notebook ./doesnotexist not found. Error: open /Users/shreyas.goenka/projects/job-output/doesnotexist: no such file or directory
```


case 2: remote (absolute) file does not exist
```
    foo:
      name: "[job-output] test-job by shreyas"

      tasks:
        - task_key: my_notebook_task
          existing_cluster_id: ***
          notebook_task:
            notebook_path: "/Users/shreyas.goenka@databricks.com/doesnotexist"
```

output:
```
shreyas.goenka@THW32HFW6T job-output % bricks bundle deploy
shreyas.goenka@THW32HFW6T job-output % bricks bundle run foo
Error: failed to reach TERMINATED or SKIPPED, got INTERNAL_ERROR: Task my_notebook_task failed with message: Notebook not found: /Users/shreyas.goenka@databricks.com/doesnotexist. This caused all downstream tasks to get skipped.
```

case 3: remote exists
Successful deploy and run
2023-03-21 18:13:16 +01:00
..
no_extension Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00
py_ipynb.ipynb Add sample ipynb files (#218) 2023-02-20 20:03:20 +01:00
py_source.py Detect Jupyter notebook files (#219) 2023-02-21 13:49:01 +01:00
r_ipynb.ipynb Add sample ipynb files (#218) 2023-02-20 20:03:20 +01:00
r_source.r Detect Jupyter notebook files (#219) 2023-02-21 13:49:01 +01:00
scala_ipynb.ipynb Add sample ipynb files (#218) 2023-02-20 20:03:20 +01:00
scala_source.scala Detect Jupyter notebook files (#219) 2023-02-21 13:49:01 +01:00
sql_ipynb.ipynb Add sample ipynb files (#218) 2023-02-20 20:03:20 +01:00
sql_source.sql Detect Jupyter notebook files (#219) 2023-02-21 13:49:01 +01:00
txt.txt Move notebook detection logic to package (#206) 2023-02-15 17:14:59 +01:00
unknown_extension.foobar Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00