Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 214
Detect mismatch between host defined in config and env variable#2549
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
eec36ef32e46007296a7fd74786d80c6d9f8678ebfc7ddaab3bd578201192f7d404bc6d2eab7d3e1dfceFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [DEFAULT] | ||
| host = https://bar.com | ||
| [profile_with_matching_host] | ||
| host = $DATABRICKS_HOST |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| bundle: | ||
| name: test-auth | ||
| targets: | ||
| match: | ||
| default: true | ||
| workspace: | ||
| host: $DATABRICKS_HOST | ||
| not_match: | ||
| workspace: | ||
| host: https://foo.com |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| === Bundle commands load bundle configuration with DATABRICKS_HOST defined, validation not OK (env-defined host doesn't match bundle host) | ||
| >>> errcode [CLI] bundle validate -t not_match | ||
| Error: cannot resolve bundle auth configuration: config host mismatch: DATABRICKS_HOST is defined as [DATABRICKS_HOST], but CLI configured to use https://foo.com | ||
| Name: test-auth | ||
| Target: not_match | ||
| Workspace: | ||
| Host: https://foo.com | ||
| Found 1 error | ||
| Exit code: 1 | ||
| === Bundle commands load bundle configuration with DATABRICKS_HOST defined, validation OK (env-defined host matches bundle host) | ||
| >>> errcode [CLI] bundle validate -t match | ||
| Name: test-auth | ||
| Target: match | ||
| Workspace: | ||
| Host: [DATABRICKS_HOST] | ||
| User: [USERNAME] | ||
| Path: /Workspace/Users/[USERNAME]/.bundle/test-auth/match | ||
| Validation OK! | ||
| === Bundle commands load bundle configuration with -p flag with DATABRICKS_HOST defined, host in profile matches bundle host but env-defined host doesn't | ||
| >>> errcode [CLI] bundle validate -t match -p profile_with_matching_host | ||
| Name: test-auth | ||
| Target: match | ||
| Workspace: | ||
| Host: [DATABRICKS_HOST] | ||
| User: [USERNAME] | ||
| Path: /Workspace/Users/[USERNAME]/.bundle/test-auth/match | ||
| Validation OK! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Replace placeholder with an actual host URL | ||
| envsubst < databricks.yml > out.yml && mv out.yml databricks.yml | ||
| envsubst < .databrickscfg > out && mv out .databrickscfg | ||
| export DATABRICKS_CONFIG_FILE=.databrickscfg | ||
| title "Bundle commands load bundle configuration with DATABRICKS_HOST defined, validation not OK (env-defined host doesn't match bundle host)" | ||
| trace errcode $CLI bundle validate -t not_match | ||
| title "Bundle commands load bundle configuration with DATABRICKS_HOST defined, validation OK (env-defined host matches bundle host)" | ||
| trace errcode $CLI bundle validate -t match | ||
| export DATABRICKS_HOST="https://baz.com" | ||
| title "Bundle commands load bundle configuration with -p flag with DATABRICKS_HOST defined, host in profile matches bundle host but env-defined host doesn't" | ||
| trace errcode $CLI bundle validate -t match -p profile_with_matching_host |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Some of the clouds have DATABRICKS_HOST variable setup without https:// prefix | ||
| # In the result, output is replaced with DATABRICKS_URL variable instead of DATABRICKS_HOST | ||
| [[Repls]] | ||
| Old='DATABRICKS_URL' | ||
| New='DATABRICKS_HOST' |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case - we have a warning displayed above that explains incorrect usage of variables in auth-related fields