databricks-cli/libs
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
..
auth Initialize BRICKS_CLI_PATH and increase default OAuth timeout (#237) 2023-03-08 16:14:24 +01:00
filer Path escape file path in filer interface (#254) 2023-03-17 17:42:35 +01:00
fileset Don't sync symlink folders (#205) 2023-02-15 17:02:54 +01:00
flags Fix test (#268) 2023-03-21 16:34:16 +01:00
git Locate and use global excludes file (#191) 2023-02-02 12:25:53 +01:00
log Add structured logging infrastructure (#246) 2023-03-16 14:46:53 +01:00
notebook Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00
sync Use new logger throughout codebase (#256) 2023-03-17 15:17:31 +01:00
testfile Refactor and cover edge cases in sync integration tests (#160) 2023-01-10 13:16:30 +01:00