Open
Conversation
…CLIs Port of databricks-sdk-py#1297 / databricks-sdk-go#1497. - CliTokenSource: add optional fallbackCmd; extract execCliCommand(); on IOError check full stdout+stderr for "unknown flag: --profile" via CliCommandException (clean stderr message exposed to users, full output used only for detection); if matched, warn and retry with fallbackCmd. - DatabricksCliCredentialsProvider: rename buildCliCommand -> buildHostArgs; when cfg.profile is set use --profile as primary command, build --host fallback if cfg.host is also present; when profile is absent keep existing --host path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Trimming stderr changed the exception message format, breaking an existing test that expected the raw stderr (including trailing newline) to be propagated through the error chain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Today `databricks auth token --profile ` fails to find a valid token even when one exists — because the token was stored under the host URL key (via `--host`), not the profile name key. The SDK's `DatabricksCliCredentialsProvider` always passed `--host` regardless of whether a profile was configured, so the CLI never had a chance to do profile-based lookup.
This is a port of databricks-sdk-py#1297 / databricks-sdk-go#1497.
Changes
`CliTokenSource`
`DatabricksCliCredentialsProvider`
Test plan
🤖 Generated with Claude Code