Support Databricks CLI authentication and early token refresh - #258
Merged
Conversation
|
@zacdav-db I tested the version. First attempt worked fine and I could authenticate and download tables. However, closing R and retry it throws following error: rlang::last_trace(): |
Collaborator
Author
|
@dabruehl I think that should now be fixed. I think more broadly now that CLI managed auth exists in this branch I think it changes how I want to reason around the option to use It may becomes confusing to end users, but its also important to allow users to continue to use |
zacdav-db
marked this pull request as ready for review
July 14, 2026 01:27
|
Hi @zacdav-db. I could test it and now it looks good. Thx |
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.
Summary
auth_type = databricks-clithroughdatabricks auth tokeninstead of the direct OAuth client.databrickscfgprofile and follow the Databricks Python SDK profile precedencehttr2_tokencredentials while leaving durable credentials and refresh to the CLIRoot cause
Brickster treated every tokenless request as a direct OAuth flow. Profiles created by
databricks auth loginidentifydatabricks-clias an external credential provider, so passing that value into Brickster's OAuth client could not reuse the CLI's secure credential storage. Older CLI versions appeared to work because they wrote a reusable token into the profile, which bypassed this tokenless OAuth path.Databricks also rejects access tokens with 30 seconds or less remaining. Earlier httr2 releases could reuse those tokens because they only treated tokens as expired five seconds early. httr2 1.3.0 exposes an expiry margin through its normal refresh path, so Brickster now uses the same 40-second buffer as the Databricks Python SDK without manipulating cache internals.
Fixes #253.
Fixes #257.
Validation
devtools::test(reporter = "summary")suite with httr2 1.3.0 — passed; 21 expected live-workspace skipsgit diff --check