mirror of https://github.com/databricks/cli.git
use $CLI instead of databricks
This commit is contained in:
parent
1996d3f824
commit
88b6dc8e16
|
@ -1,11 +1,11 @@
|
|||
|
||||
>>> [CLI] bundle exec -- databricks current-user me
|
||||
>>> [CLI] bundle exec -- [CLI] current-user me
|
||||
{
|
||||
"id":"[USERID]",
|
||||
"userName":"[USERNAME]"
|
||||
}
|
||||
|
||||
>>> [CLI] bundle exec --profile myprofile -- databricks current-user me
|
||||
>>> [CLI] bundle exec --profile myprofile -- [CLI] current-user me
|
||||
{
|
||||
"id":"[USERID]",
|
||||
"userName":"[USERNAME]"
|
||||
|
|
|
@ -8,7 +8,7 @@ unset DATABRICKS_HOST
|
|||
unset DATABRICKS_TOKEN
|
||||
|
||||
# This should use the profile configured in the bundle, i.e. PAT auth
|
||||
trace $CLI bundle exec -- databricks current-user me
|
||||
trace $CLI bundle exec -- $CLI current-user me
|
||||
|
||||
# This should use myprofile, which uses oauth.
|
||||
trace $CLI bundle exec --profile myprofile -- databricks current-user me
|
||||
trace $CLI bundle exec --profile myprofile -- $CLI current-user me
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
|
||||
>>> [CLI] bundle exec -- databricks current-user me
|
||||
>>> [CLI] bundle exec -- [CLI] current-user me
|
||||
{
|
||||
"id":"[USERID]",
|
||||
"userName":"[USERNAME]"
|
||||
}
|
||||
|
||||
>>> [CLI] bundle exec -t pat -- databricks current-user me
|
||||
>>> [CLI] bundle exec -t pat -- [CLI] current-user me
|
||||
{
|
||||
"id":"[USERID]",
|
||||
"userName":"[USERNAME]"
|
||||
}
|
||||
|
||||
>>> errcode [CLI] bundle exec -t pat -- databricks current-user me -t oauth
|
||||
>>> errcode [CLI] bundle exec -t pat -- [CLI] current-user me -t oauth
|
||||
Error: cannot resolve bundle auth configuration: validate: more than one authorization method configured: oauth and pat. Config: host=[DATABRICKS_URL], token=***, client_id=client_id, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH
|
||||
Error: Running "databricks current-user me -t oauth" failed with exit code: 1
|
||||
Error: Running "[CLI] current-user me -t oauth" failed with exit code: 1
|
||||
|
||||
Exit code: 1
|
||||
|
||||
>>> [CLI] bundle exec -t oauth -- databricks current-user me
|
||||
>>> [CLI] bundle exec -t oauth -- [CLI] current-user me
|
||||
{
|
||||
"id":"[USERID]",
|
||||
"userName":"[USERNAME]"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Default target
|
||||
trace $CLI bundle exec -- databricks current-user me
|
||||
trace $CLI bundle exec -- $CLI current-user me
|
||||
|
||||
# Explicitly select default target
|
||||
trace $CLI bundle exec -t pat -- databricks current-user me
|
||||
trace $CLI bundle exec -t pat -- $CLI current-user me
|
||||
|
||||
# Conflicting targets selected. This should fail because for the child command
|
||||
# pat would be configured via environment variables and oauth via the CLI resulting
|
||||
# in more than one authorization method configured.
|
||||
trace errcode $CLI bundle exec -t pat -- databricks current-user me -t oauth
|
||||
trace errcode $CLI bundle exec -t pat -- $CLI current-user me -t oauth
|
||||
|
||||
# Explicitly select oauth target
|
||||
export DATABRICKS_TOKEN=""
|
||||
export DATABRICKS_CLIENT_SECRET="client_secret"
|
||||
trace $CLI bundle exec -t oauth -- databricks current-user me
|
||||
trace $CLI bundle exec -t oauth -- $CLI current-user me
|
||||
|
|
Loading…
Reference in New Issue