Skip to content

Use CLI's auth token command in databricks-cli auth#1428

Merged
tejaskochar-db merged 11 commits intomainfrom
databricks-cli-token
Jan 29, 2026
Merged

Use CLI's auth token command in databricks-cli auth#1428
tejaskochar-db merged 11 commits intomainfrom
databricks-cli-token

Conversation

@tejaskochar-db
Copy link
Contributor

@tejaskochar-db tejaskochar-db commented Jan 20, 2026

Changes

Refactor databricks-cli auth to use the CLI's auth token command to fetch tokens instead of fetching them directly from the token store.

The command checks the isUnifiedHost flag and passes arguments in the call to auth token appropriately.

Why

This change results in all the SDKs using a consistent interface for accessing tokens for this auth type as the Java and Python SDKs were already doing this. It also makes the token store an implementation detail of the CLI, making future re-factorings a lot simpler.

How is this tested?

unit tests


NO_CHANGELOG=true

Copy link
Contributor

@tanmay-db tanmay-db left a comment

Choose a reason for hiding this comment

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

Look a look over the unified host changes in the commit (ff0597a) and they are looking good.

Could you also manually test the U2M changes for them? i.e. using CLI generated profiles through the Go SDK. (before ff0597a it should fail), after this, it should pass.

@tejaskochar-db
Copy link
Contributor Author

Could you also manually test the U2M changes for them? i.e. using CLI generated profiles through the Go SDK. (before ff0597a it should fail), after this, it should pass.

Tested it manually, it works.

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1428
  • Commit SHA: e2476a44948d9a2e4fec7689880f768e62d15309

Checks will be approved automatically on success.

@tejaskochar-db tejaskochar-db added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 7714f99 Jan 29, 2026
15 checks passed
@tejaskochar-db tejaskochar-db deleted the databricks-cli-token branch January 29, 2026 08:22
tejaskochar-db added a commit to databricks/cli that referenced this pull request Feb 12, 2026
## Changes
Update the `auth profiles` command to always load the value of the
`DATABRICKS_CLI_PATH` environment variable as it otherwise does not load
any environment variables.

## Why
databricks/databricks-sdk-go#1428 changed the
`databricks-cli` auth type in the Go SDK to use the CLI to fetch tokens
instead of touching the U2M token store itself. Because of this
acceptance tests break when we try to bump the go sdk version in the
CLI, as the CLI was not accessible in the test environment. This PR
makes it accessible.

## Tests
auth login acceptance tests should pass

---------

Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
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.

3 participants