Support non-interactive configure with --profiles#156
Merged
Conversation
Collaborator
|
@bbqiu Im okay with adding the So to force ucode to use a PAT token can the contract be the following.
That can work in a Lakebox / CI like environment imo but for interactive use cases the default should force you to oauth. |
rohita5l
previously approved these changes
Jun 12, 2026
…kip-validate Adds an explicit, fully non-interactive setup path for CI / headless environments (e.g. lakebox sandboxes provisioned with a PAT-backed DEFAULT profile): - `configure --profiles <names>` resolves workspace URLs from existing ~/.databrickscfg profiles instead of prompting. Auth behaves like --workspaces: OAuth login is forced by default. - `--use-pat` (requires --profiles) authenticates with the profile's personal access token instead of OAuth — ucode never picks up a PAT implicitly. The token is validated, exported as DATABRICKS_BEARER for the configure run and launched agents, and persisted as use_pat in state so launches inherit the mode; written agent configs carry a `databricks auth describe --sensitive`-based auth command so bare claude/codex runs refresh from the PAT too. - `--skip-validate` skips the post-configure test message through each agent; configs are still written with freshly discovered models. Co-authored-by: Isaac Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
d863600 to
efaec90
Compare
rohita5l
approved these changes
Jun 12, 2026
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.
ucode configure forced an interactive databricks auth login even when a static credential was available, and PAT profiles in ~/.databrickscfg were invisible to ucode (databricks auth token is OAuth-only). Now:
ucode configure --profiles <names>uses already-authenticated CLI profiles with no interactive login; mutually exclusive with --workspaces.databricks auth describe --sensitivefor PAT profiles so launched agents can refresh tokens.tested manually:
--profiles and --workspaces still work