Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions acceptance/auth/bundle_default_profile/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ Exit code: 1
=== Bundle with workspace.host: default_profile is NOT applied

>>> errcode [CLI] bundle validate -o json
Error: failed during request visitor: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=[DATABRICKS_URL], workspace_id=[NUMID], databricks_cli_path=[CLI]. Env: DATABRICKS_CLI_PATH


Exit code: 1
Comment thread
janniklasrose marked this conversation as resolved.
{
"host": "[DATABRICKS_URL]",
"profile": null
Expand All @@ -35,7 +31,7 @@ Exit code: 1
=== Bundle with workspace.profile: pinned profile wins over default_profile

>>> errcode [CLI] bundle validate -o json
Error: failed during request visitor: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: profile=other, databricks_cli_path=[CLI]. Env: DATABRICKS_CLI_PATH
Error: Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted)
Comment thread
janniklasrose marked this conversation as resolved.


Exit code: 1
Expand Down
6 changes: 3 additions & 3 deletions acceptance/cmd/auth/describe/u2m-plaintext-config/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
>>> [CLI] auth describe --profile u2m-profile
Warn: [hostmetadata] failed to fetch host metadata for https://u2m-profile.databricks.test, will skip for 1m0s
Unable to authenticate: error getting token: cache: token not found
Token storage: plaintext, ~/.databricks/token-cache.json (from auth_storage in [__settings__] section of home/.databrickscfg)
Token storage: plaintext, ~/.databricks/token-cache.json (from auth_storage in [__settings__] section of [TEST_TMP_DIR]/home/.databrickscfg)
-----
Current configuration:
✓ host: https://u2m-profile.databricks.test (from ./home/.databrickscfg config file)
✓ host: https://u2m-profile.databricks.test (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ profile: u2m-profile (from --profile flag)
✓ databricks_cli_path: [CLI]
✓ auth_type: databricks-cli (from ./home/.databrickscfg config file)
✓ auth_type: databricks-cli (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ rate_limit: [NUMID] (from DATABRICKS_RATE_LIMIT environment variable)
4 changes: 2 additions & 2 deletions acceptance/cmd/auth/describe/u2m-plaintext-default/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Unable to authenticate: error getting token: cache: token not found
Token storage: plaintext, ~/.databricks/token-cache.json (from default)
-----
Current configuration:
✓ host: https://u2m-profile.databricks.test (from ./home/.databrickscfg config file)
✓ host: https://u2m-profile.databricks.test (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ profile: u2m-profile (from --profile flag)
✓ databricks_cli_path: [CLI]
✓ auth_type: databricks-cli (from ./home/.databrickscfg config file)
✓ auth_type: databricks-cli (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ rate_limit: [NUMID] (from DATABRICKS_RATE_LIMIT environment variable)
4 changes: 2 additions & 2 deletions acceptance/cmd/auth/describe/u2m-plaintext-env/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Unable to authenticate: error getting token: cache: token not found
Token storage: plaintext, ~/.databricks/token-cache.json (from DATABRICKS_AUTH_STORAGE environment variable)
-----
Current configuration:
✓ host: https://u2m-profile.databricks.test (from ./home/.databrickscfg config file)
✓ host: https://u2m-profile.databricks.test (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ profile: u2m-profile (from --profile flag)
✓ databricks_cli_path: [CLI]
✓ auth_type: databricks-cli (from ./home/.databrickscfg config file)
✓ auth_type: databricks-cli (from [TEST_TMP_DIR]/home/.databrickscfg config file)
✓ rate_limit: [NUMID] (from DATABRICKS_RATE_LIMIT environment variable)
16 changes: 8 additions & 8 deletions acceptance/cmd/completion/output.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@

>>> [CLI] completion install --shell zsh --auto-approve
Databricks CLI completions installed for zsh.
Restart your shell or run 'source home/.zshrc' to activate.
Restart your shell or run 'source [HOME]/.zshrc' to activate.

Warning: zsh completions require the completion system to be initialized.
Add the following to your home/.zshrc:
Add the following to your [HOME]/.zshrc:
autoload -U compinit && compinit

>>> [CLI] completion status --shell zsh
Shell: zsh
File: home/.zshrc
File: [HOME]/.zshrc
Status: installed

Warning: zsh completions require the completion system to be initialized.
Add the following to your home/.zshrc:
Add the following to your [HOME]/.zshrc:
autoload -U compinit && compinit

>>> [CLI] completion install --shell zsh --auto-approve
Databricks CLI completions are already installed for zsh in home/.zshrc.
Databricks CLI completions are already installed for zsh in [HOME]/.zshrc.

Warning: zsh completions require the completion system to be initialized.
Add the following to your home/.zshrc:
Add the following to your [HOME]/.zshrc:
autoload -U compinit && compinit

>>> [CLI] completion uninstall --shell zsh --auto-approve
Databricks CLI completions removed for zsh from home/.zshrc.
Databricks CLI completions removed for zsh from [HOME]/.zshrc.

>>> [CLI] completion status --shell zsh
Shell: zsh
File: home/.zshrc
File: [HOME]/.zshrc
Status: not installed
# bash completion V2 for databricks -*- shell-script -*-
#compdef databricks
Expand Down
19 changes: 19 additions & 0 deletions acceptance/script.prepare
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,25 @@ sethome() {
local home="$1"
mkdir -p "$home"

# Resolve to an absolute path so HOME (and USERPROFILE) keep pointing at
# the same directory after the test cd's elsewhere. The SDK expands
# `~/.databrickscfg` against $HOME at lookup time; with a relative path
# the cfg silently disappears once the cwd changes, and helpers like
# databrickscfg.GetConfiguredDefaultProfile return "" instead of
# erroring.
#
# On Git Bash (MSYS), plain `pwd` returns Unix-style /c/... paths that
# the native Windows Go binary can't open; `pwd -W` returns the mixed
# C:/... form instead. Use the same form for both HOME and USERPROFILE
# so tests that compare a `$HOME`-based placeholder against the CLI's
# `os.UserHomeDir()` output (which reads USERPROFILE on Windows) find
# a match.
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
home="$(cd "$home" && pwd -W)"
else
home="$(cd "$home" && pwd)"
fi

# For macOS and Linux, use HOME.
export HOME="$home"

Expand Down
Loading