databricks-cli/bundle/config/mutator
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
..
default_environment.go No need for nil check on map (#143) 2022-12-15 21:28:27 +01:00
default_environment_test.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
default_include.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
default_include_test.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
default_workspace_paths.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
default_workspace_paths_test.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
default_workspace_root.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
default_workspace_root_test.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
expand_workspace_root.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
expand_workspace_root_test.go Add workspace paths (#179) 2023-01-26 19:55:38 +01:00
mutator.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
populate_current_user.go Mutators to define current user and default artifact path (#112) 2022-12-01 11:17:29 +01:00
populate_current_user_test.go Mutators to define current user and default artifact path (#112) 2022-12-01 11:17:29 +01:00
process_include.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
process_include_test.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
process_root_includes.go Materialize glob expansion in configuration struct (#217) 2023-02-20 21:01:28 +01:00
process_root_includes_test.go Materialize glob expansion in configuration struct (#217) 2023-02-20 21:01:28 +01:00
select_default_environment.go Handle nil environment (#154) 2022-12-22 15:31:32 +01:00
select_default_environment_test.go Handle nil environment (#154) 2022-12-22 15:31:32 +01:00
select_environment.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
select_environment_test.go Move mutator interface to top level bundle package (#105) 2022-11-28 10:59:43 +01:00
translate_notebook_paths.go Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00
translate_notebook_paths_test.go Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00