Skip to content

Remove auth workspace picker limit and support ID search - #7071

Merged
simonfaltum merged 5 commits into
mainfrom
codex/br-2184-workspace-picker
Oct 15, 2026
Merged

simonfaltum merged 5 commits into
mainfrom
codex/br-2184-workspace-picker

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Why

databricks auth login against an account host lists the account's workspaces and asks you to pick one. Accounts with more than 50 workspaces only saw the first 50, so the workspace you needed could be missing, and the only way out was rerunning with --workspace-id. Search also only matched names, so knowing the ID didn't help.

Fixes BR-2184, including the picker used by ug configure.

Changes

Before: the picker showed the first 50 workspaces and only searched by name.
Now: the picker includes every workspace and you can search by name or ID.

  • Removed the 50-workspace cap in promptForWorkspaceSelection. The SDK list call has no pagination or search parameters, so it's still one request and filtering stays local.
  • Added newWorkspaceSearcher, which matches case-insensitive name substrings and ID substrings. An exact ID match narrows the list to that workspace, so typing 123 doesn't also show 1234.
  • Every row shows the workspace ID, the highlighted row gets the same ▸ marker as the profile picker, and workspaces without a name render as their ID. The label now says (search by name or ID).
  • Skip and the manual ID prompt (used when listing fails) behave as before.
  • Exported termtest.Run so command-level prompts can use the same terminal harness as the cmdio prompt tests.

Test plan

  • Searcher unit tests: name, ID, exact-ID precedence, whitespace, duplicate names, empty names, non-ASCII names, Skip.
  • Picker tests through the real SDK list/decode path against a local server: more than 50 workspaces, no-results recovery, list errors, non-interactive mode, plus a golden snapshot of the rendered list.
  • ./task checks, ./task lint-q, ./task fmt-q, and the cmd/auth/login acceptance tests.
  • Synthetic 1k/10k/100k workspace lists through the SDK and terminal picker: search p95 about 17 ms per keystroke. Startup at 100k is dominated by fetching and decoding the full list, which the capped version also did.
  • Live account smoke test, including ug configure.

This pull request and its description were written by Isaac.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 074c284

Run: 38762150407

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 15 5:20
✅​ aws-windows-latest-4core-16gb 278 13 3:23
✅​ azure linux-2core-8gb 275 15 5:24
✅​ azure-windows-latest-4core-16gb 277 13 3:15
✅​ gcp linux-2core-8gb 276 15 5:22
✅​ gcp-windows-latest-4core-16gb 278 13 4:55
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:34 gcp-windows-latest-4core-16gb TestAccept
3:43 azure linux-2core-8gb TestAccept
3:41 aws linux-2core-8gb TestAccept
3:32 gcp linux-2core-8gb TestAccept
3:09 aws-windows-latest-4core-16gb TestAccept
3:02 azure-windows-latest-4core-16gb TestAccept

Every row now shows the workspace ID, so bold alone no longer made the
highlighted row stand out. Add the same marker the profile picker uses,
render nameless workspaces by ID without a stray leading space, and say in
the label that ID search works.

Isolate the picker tests from the developer's DATABRICKS_* environment and
pin the rendered list with a golden snapshot.

Co-authored-by: Isaac <no-reply@databricks.com>
simonfaltum and others added 2 commits October 15, 2026 17:28
Keep the golden snapshot LF on Windows checkouts, matching
libs/cmdio/cmdiotest/testdata. Clear only DATABRICKS_CONFIG_PROFILE
instead of the whole environment: without SystemRoot, Windows can't
open the httptest listener.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum marked this pull request as ready for review October 15, 2026 18:57
@simonfaltum
simonfaltum requested review from a team as code owners October 15, 2026 18:57
@simonfaltum
simonfaltum added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit c2f4faa Oct 15, 2026
26 checks passed
@simonfaltum
simonfaltum deleted the codex/br-2184-workspace-picker branch October 15, 2026 19:06
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