Skip to content

Use Databricks CLI for gated custom OAuth - #695

Merged
lilly-luo merged 23 commits into
mainfrom
codex/custom-oauth-cli
Sep 17, 2026
Merged

lilly-luo merged 23 commits into
mainfrom
codex/custom-oauth-cli

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • retrieve custom OAuth tokens through databricks auth token when ENABLE_CUSTOM_OAUTH_FROM_CLI=1
  • pass the configured custom client ID through DATABRICKS_CLIENT_ID and preserve --force-refresh
  • require Databricks CLI v1.17.0 only for the gated path; keep the existing SDK flow unchanged otherwise

Testing

  • UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/test_custom_oauth.py -q
  • UV_CACHE_DIR=/tmp/uv-cache uv run ruff check src/ucode/custom_oauth.py tests/test_custom_oauth.py

Version note

PR databricks/cli#6594 is included in Databricks CLI v1.17.0. The requested v0.17.0 predates this feature, so this change uses v1.17.0 as the feature-specific minimum.

  "apiKeyHelper": "/tmp/unity-gateway-custom-oauth/.venv/bin/ug auth-token --profile devtools-prod --client-id 4f7af981-8977-4042-b90e-a5dea5b62e19",

Comment thread src/ucode/custom_oauth.py
Comment thread src/ucode/custom_oauth.py Outdated
Comment thread src/ucode/custom_oauth.py Outdated
Comment thread src/ucode/agents/codex.py Outdated
Comment thread src/ucode/custom_oauth.py Outdated

@rohita5l rohita5l left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving but please see the P1/P2

@lilly-luo
lilly-luo enabled auto-merge (squash) September 17, 2026 15:51
@lilly-luo
lilly-luo merged commit aa136ed into main Sep 17, 2026
20 checks passed
@lilly-luo
lilly-luo deleted the codex/custom-oauth-cli branch September 17, 2026 15:58
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