databricks-cli/acceptance/auth/bundle_and_profile
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
..
.databrickscfg acc: Added acceptance test for CLI commands inside bundle with and without profile flag (#2270) 2025-02-05 11:53:36 +00:00
databricks.yml acc: Added acceptance test for CLI commands inside bundle with and without profile flag (#2270) 2025-02-05 11:53:36 +00:00
output.txt Do not load host from bundle for CLI commands when profile flag is used (#2335) 2025-02-26 12:30:38 +00:00
script Do not load host from bundle for CLI commands when profile flag is used (#2335) 2025-02-26 12:30:38 +00:00
test.toml Do not load host from bundle for CLI commands when profile flag is used (#2335) 2025-02-26 12:30:38 +00:00