databricks-cli/cmd
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
..
account Bump Go SDK to v0.26.0 (#1019) 2023-11-29 13:29:31 +00:00
api Update Go SDK to v0.19.0 (#729) 2023-09-05 09:43:57 +00:00
auth Tolerate missing .databrickscfg file during `databricks auth login` (#1003) 2023-11-23 09:04:54 +00:00
bundle Add mlops-stacks to the default `databricks bundle init` prompt (#988) 2023-11-28 09:04:06 +00:00
configure Filter out system clusters for `--configure-cluster` (#1031) 2023-11-30 09:59:11 +00:00
fs Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
labs Fix `panic: $HOME is not set` (#1027) 2023-11-29 19:08:27 +00:00
root Fix panic when bundle auth resolution fails (#1002) 2023-11-30 14:28:01 +00:00
sync Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
version Added description for version command (#737) 2023-09-06 08:41:47 +00:00
workspace Bump Go SDK to v0.26.0 (#1019) 2023-11-29 13:29:31 +00:00
cmd.go Add `databricks labs` command group (#914) 2023-11-17 12:47:37 +00:00