[mason] mason login authenticates you (no separate databricks auth login) - #523
Closed
akansal2 wants to merge 2 commits into
Closed
[mason] mason login authenticates you (no separate databricks auth login)#523akansal2 wants to merge 2 commits into
akansal2 wants to merge 2 commits into
Conversation
…gin) mason login now runs the Databricks OAuth sign-in itself when the profile has no usable credentials yet — it shells `databricks auth login` (already required for dev/deploy), then validates and remembers the profile. An already-authenticated profile is just validated, so no browser opens. Adds --host for first-time profile creation and updates the README to the single-command flow. Co-authored-by: Isaac <no-reply@databricks.com>
Users don't need to see the wrapped `databricks auth login ...` invocation; the hint already tells them what to do (re-run mason login / pass --host). Co-authored-by: Isaac <no-reply@databricks.com>
akansal2
marked this pull request as ready for review
September 3, 2026 16:56
Author
|
Superseded by #520 ("Make Mason login configure Databricks authentication"), which already landed the same |
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.
What did you change, and why?
Change:
mason loginnow authenticates a profile on its own. If the profile has no usable credentials yet, it runs the Databricks OAuth sign-in for you (by shellingdatabricks auth login, already a requirement fordev/deploy), then validates and remembers it. An already-authenticated profile is just validated — no browser opens. Adds--hostfor first-time profile creation.Why: From the custom-agent bug bash, users had to run two commands —
databricks auth loginthenmason login— and error messages that said "rundatabricks auth login" were confusing when the fix that worked wasmason login(Ann's report).mason loginis now the only auth command needed.Behavior:
~/.databrickscfgexactly as the Databricks CLI writes them; Mason only stores the selected profile name in~/.mason/config.json.Pairs with #522 (clearer auth error messages), whose hints all point at this single
mason login.How do you know it works?
Testing:
python -m py_compileon the changed modules (clean). Added unit tests inauth_test.py:mason loginruns the sign-in exactly once when the profile has no credentials (and persists the selection), and skips the sign-in entirely when the profile already authenticates. Existingauth_test.pycases are unchanged. Full suite runs in CI. Draft until CI is green.