databricks-cli/bundle
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
..
artifacts Mutators to define current user and default artifact path (#112) 2022-12-01 11:17:29 +01:00
config Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00
deploy Add permissions block to each resource (#264) 2023-03-21 10:58:16 +01:00
deployer Use new logger throughout codebase (#256) 2023-03-17 15:17:31 +01:00
internal/tf Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
phases Execute file synchronization on deploy (#211) 2023-02-20 19:42:55 +01:00
run Add job run output logging (#260) 2023-03-21 16:25:18 +01:00
schema Use tracker for reference loop tracking (#252) 2023-03-16 12:57:57 +01:00
tests Revert "Rename jobs -> workflows" (#118) 2022-12-01 22:39:15 +01:00
bundle.go Add function to opportunistically load a bundle (#180) 2023-01-27 16:57:39 +01:00
bundle_test.go Add function to opportunistically load a bundle (#180) 2023-01-27 16:57:39 +01:00
context.go Make sync command work in bundle context; reorder args (#207) 2023-02-20 11:33:30 +01:00
context_test.go Add command that writes the materialized bundle configuration to stdout (#95) 2022-11-21 15:39:53 +01:00
mutator.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
mutator_test.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
root.go Add function to opportunistically load a bundle (#180) 2023-01-27 16:57:39 +01:00
root_test.go Add function to opportunistically load a bundle (#180) 2023-01-27 16:57:39 +01:00