Prompt for workspace ID when workspace list fails#4859
Conversation
When `databricks auth login` cannot fetch the workspace list (e.g. when the user has no account-level permissions), instead of silently continuing without a workspace, prompt the user to manually enter a workspace ID. Empty input skips workspace selection as before. Co-authored-by: Isaac
Suggested reviewersBased on git history of the changed files, these people are best suited to review:
Confidence: low Eligible reviewersBased on CODEOWNERS, these people or teams could also review: @andrewnester, @anton-107, @denik, @shreyas-goenka Suggestions based on git history of 1 changed files (1 scored). See CODEOWNERS for path-specific ownership rules. |
|
Commit: 53f7181
17 interesting tests: 10 SKIP, 7 RECOVERED
Top 20 slowest tests (at least 2 minutes):
|
The warning was noisy for users without account-level access since the fallback to prompting for workspace ID is expected behavior. Co-authored-by: Isaac
simonfaltum
left a comment
There was a problem hiding this comment.
Review Swarm: Isaac + Cursor | 2 rounds
Verdict: Not ready yet (1 Critical)
1 Critical | 0 Major | 3 Nit | 1 Suggestion
[Nit] Stale docstring on promptForWorkspaceSelection (Found by: Cursor, Confirmed by: Isaac)
The comment block above promptForWorkspaceSelection (around line 700) says errors are returned to the caller for logging. This PR changes that behavior: the Workspaces.List error is now logged internally and the function falls back to manual input. Consider updating the comment.
[Nit] Warning message could mention alternatives (Found by: Isaac)
Low priority. The subsequent prompt makes the next step obvious. Could optionally mention --workspace-id for scripted usage.
[Suggestion] Add unit test for the fallback path (Found by: Both)
No automated coverage for the new fallback behavior. Test infrastructure already exists (e.g. cmdio.SetupTest for canned input). A test that mocks a failing Workspaces.List and verifies the manual prompt fires would be valuable.
|
Commit: cbb703c
52 interesting tests: 23 RECOVERED, 17 flaky, 7 FAIL, 3 KNOWN, 2 SKIP
Top 50 slowest tests (at least 2 minutes):
|
Summary
databricks auth loginfails to fetch the workspace list (e.g. user lacks account-level permissions), prompt the user to manually enter a workspace ID instead of logging and error and skipping the workspace selection.Manual test
Test plan
This pull request was AI-assisted by Isaac.