databricks-cli/bundle/config
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
..
interpolation Use clearer error message when no interpolation value is found. (#764) 2023-09-11 15:23:25 +00:00
mutator Fix panic when bundle auth resolution fails (#1002) 2023-11-30 14:28:01 +00:00
paths Persist deployment metadata in WSFS (#845) 2023-10-27 12:55:43 +00:00
resources Support Unity Catalog Registered Models in bundles (#846) 2023-10-16 15:32:49 +00:00
testdata First look for databricks.yml before falling back to bundle.yml (#580) 2023-07-18 12:16:34 +02:00
variable Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
artifact.go Mark artifacts properties as optional (#834) 2023-10-03 13:59:28 +00:00
bundle.go Persist deployment metadata in WSFS (#845) 2023-10-27 12:55:43 +00:00
experimental.go Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
filename.go Move bundle configuration filename code (#917) 2023-10-25 09:54:39 +00:00
filename_test.go Move bundle configuration filename code (#917) 2023-10-25 09:54:39 +00:00
git.go Persist deployment metadata in WSFS (#845) 2023-10-27 12:55:43 +00:00
lock.go Persist deployment metadata in WSFS (#845) 2023-10-27 12:55:43 +00:00
lock_test.go Acquire lock prior to deploy (#270) 2023-03-22 16:37:26 +01:00
resources.go Support Unity Catalog Registered Models in bundles (#846) 2023-10-16 15:32:49 +00:00
resources_test.go Support Unity Catalog Registered Models in bundles (#846) 2023-10-16 15:32:49 +00:00
root.go Added support for top-level permissions (#928) 2023-11-13 11:29:40 +00:00
root_test.go Consolidate bundle configuration loader function (#918) 2023-10-25 12:55:56 +00:00
sync.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
target.go Added support for top-level permissions (#928) 2023-11-13 11:29:40 +00:00
workspace.go Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
workspace_test.go Resolve configuration before performing verification (#890) 2023-10-20 13:10:31 +00:00