Improve auth token UX: profile selection and better empty-state handling#4584
Draft
simonfaltum wants to merge 1 commit intomainfrom
Draft
Improve auth token UX: profile selection and better empty-state handling#4584simonfaltum wants to merge 1 commit intomainfrom
auth token UX: profile selection and better empty-state handling#4584simonfaltum wants to merge 1 commit intomainfrom
Conversation
…dling When `databricks auth token` is invoked with no arguments, replace the raw host prompt with smarter resolution: 1. Check DATABRICKS_HOST env var (highest priority) 2. Check DATABRICKS_CONFIG_PROFILE env var 3. Interactive mode: show a profile selector with "Enter host manually" and "Create new profile" options 4. Non-interactive mode: clear error messages guiding users to --profile or databricks auth login Existing behavior (--profile, --host, positional args) is unchanged. Also extracts applyUnifiedHostFlags helper to reduce duplication, simplifies test context handling, and adds acceptance tests for the non-interactive no-args cases.
Collaborator
|
Commit: e2d6e0f
15 interesting tests: 7 KNOWN, 7 SKIP, 1 RECOVERED
Top 20 slowest tests (at least 2 minutes):
|
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
databricks auth tokenis invoked with no arguments, resolve through env vars (DATABRICKS_HOST,DATABRICKS_CONFIG_PROFILE) first, then show an interactive profile picker or a clear non-interactive error"no profile specified. Use --profile <name>"(profiles exist) or"no profiles configured. Run 'databricks auth login'"(no profiles)--profile,--host, and positional arg behavior unchangedCloses DECO-26401
Test plan
no-args-with-profilesandno-args-no-profilesmake lintfullandmake checkspass🤖 Generated with Claude Code