databricks-cli/bundle/config/mutator
shreyas-goenka 677926b78b
Fix panic when bundle auth resolution fails (#1002)
## Changes
CLI would panic if an invalid bundle auth is setup when running CLI
commands. This PR removes the panic and shows the error message directly
instead.

## Tests
The CWD is a bundle with:
```
workspace:
  profile: DEFAULT
```

Before:
```
shreyas.goenka@THW32HFW6T bundle-playground % cli clusters list
panic: resolve: /Users/shreyas.goenka/.databrickscfg has no DEFAULT profile configured. Config: profile=DEFAULT

goroutine 1 [running]:
```

After:
```
shreyas.goenka@THW32HFW6T bundle-playground % cli clusters list
Error: cannot resolve bundle auth configuration: resolve: /Users/shreyas.goenka/.databrickscfg has no DEFAULT profile configured. Config: profile=DEFAULT
```

```
shreyas.goenka@THW32HFW6T bundle-playground % DATABRICKS_CONFIG_FILE=/dev/null cli bundle deploy
Error:  cannot resolve bundle auth configuration: resolve: /dev/null has no DEFAULT profile configured. Config: profile=DEFAULT, config_file=/dev/null. Env: DATABRICKS_CONFIG_FILE
```
2023-11-30 14:28:01 +00:00
..
default_target.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
default_target_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
default_workspace_paths.go Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
default_workspace_paths_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
default_workspace_root.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
default_workspace_root_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
expand_pipeline_glob_paths.go Do not replace pipeline libraries if there are no matches for pattern (#1021) 2023-11-29 13:20:13 +00:00
expand_pipeline_glob_paths_test.go Do not replace pipeline libraries if there are no matches for pattern (#1021) 2023-11-29 13:20:13 +00:00
expand_workspace_root.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
expand_workspace_root_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
if.go Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
initialize_variables.go Initialize variable definitions that are defined without properties (#966) 2023-11-08 11:01:14 +00:00
initialize_variables_test.go Initialize variable definitions that are defined without properties (#966) 2023-11-08 11:01:14 +00:00
initialize_workspace_client.go Fix panic when bundle auth resolution fails (#1002) 2023-11-30 14:28:01 +00:00
load_git_details.go Persist deployment metadata in WSFS (#845) 2023-10-27 12:55:43 +00:00
mutator.go Initialize variable definitions that are defined without properties (#966) 2023-11-08 11:01:14 +00:00
noop.go Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
override_compute.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
override_compute_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
populate_current_user.go Use normalized short name for tag value in development mode (#821) 2023-10-02 06:58:51 +00:00
populate_current_user_test.go Allow digits in the generated short name (#820) 2023-09-29 06:58:40 +00:00
process_include.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
process_include_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
process_root_includes.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
process_root_includes_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
process_target_mode.go Fixed panic when job has trigger and in development mode (#1026) 2023-11-29 16:32:42 +00:00
process_target_mode_test.go Fixed panic when job has trigger and in development mode (#1026) 2023-11-29 16:32:42 +00:00
run_as.go Added run_as section for bundle configuration (#692) 2023-08-23 16:47:07 +00:00
select_default_target.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
select_default_target_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
select_target.go List available targets when incorrect target passed (#756) 2023-09-08 15:37:55 +00:00
select_target_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
set_variables.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
set_variables_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00
trampoline.go Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
trampoline_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
translate_paths.go Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
translate_paths_artifacts.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_jobs.go Enable `spark_jar_task` with local JAR libraries (#993) 2023-11-21 10:15:09 +00:00
translate_paths_pipelines.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_test.go Enable `spark_jar_task` with local JAR libraries (#993) 2023-11-21 10:15:09 +00:00
validate_git_details.go Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00
validate_git_details_test.go Replace direct calls with `bundle.Apply` (#990) 2023-11-15 14:19:18 +00:00