databricks-cli/cmd
Andrew Nester df001dcdfe
Do not load host from bundle for CLI commands when profile flag is used (#2335)
## Changes
Now when `profile` flag is used we won't pick up host from bundle
anymore and use the one provided by -p flag

Previous behaviour in the context of bundle
```
databricks current-user me -p profile_name
Error: cannot resolve bundle auth configuration: config host mismatch: profile uses host https://non-existing-subdomain.databricks.com, but CLI configured to use https://foo.com
```

New behaviour (make an api call)
```
databricks current-user me -p profile_name
{
  email: "foo@bar.com"
  ...
}
```

We still load bundle configuration when `-t` flag provide because we
want to load host information from the target.

Fixes #1358 

## Tests
Added acceptance test
2025-02-26 12:30:38 +00:00
..
account Fixed accessing required path parameters in CLI generation when --json flag (#2373) 2025-02-25 20:20:06 +00:00
api Bump github.com/databricks/databricks-sdk-go from 0.55.0 to 0.56.1 (#2238) 2025-01-27 13:11:07 +00:00
auth Add doc string for the `auth token` command (#2302) 2025-02-07 11:51:37 +00:00
bundle Append newline to "-o json" for validate/summary/run (#2326) 2025-02-10 14:00:49 +01:00
configure Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
fs Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
labs Add support for extras to the labs CLI (#2288) 2025-02-05 13:24:15 +00:00
root Do not load host from bundle for CLI commands when profile flag is used (#2335) 2025-02-26 12:30:38 +00:00
sync Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
version Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
workspace Fixed accessing required path parameters in CLI generation when --json flag (#2373) 2025-02-25 20:20:06 +00:00
cmd.go Fix duplicate "apps" entry in help output (#2191) 2025-01-20 16:02:29 +00:00