Skip to content

Improve error message for host mismatch between bundle and profile used #3100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andrewnester
Copy link
Contributor

Changes

Improve error message for host mismatch between bundle and profile used

Why

Now we make the wording a bit more explicit and include suggestion which config profile can be used.

Tests

Covered by existing acceptance tests

@@ -19,7 +19,7 @@ Exit code: 1

=== Inside the bundle, target and not matching profile
>>> errcode [CLI] current-user me -t dev -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 [DATABRICKS_TARGET]
Error: cannot resolve bundle auth configuration: the host in the profile (https://non-existing-subdomain.databricks.com) doesn’t match the host configured in the bundle ([DATABRICKS_TARGET]). Did you mean to use the profile DEFAULT?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to use the profile DEFAULT?

Not super clear, does it mean passing "-p DEFAULT"? or omitting "-p" or something else?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we elaborate this more?

The profile "DEFAULT" has host="https://bla.com" that matches host in the bundle/dev target. To select it, pass "-t DEFAULT".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated here 4329e46

@andrewnester andrewnester requested a review from denik June 23, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants