Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ca0b554
Add `databricks doctor` diagnostic command
simonfaltum Mar 12, 2026
8c0a915
Fix review findings: config resolution, timeouts, output routing, tests
simonfaltum Mar 13, 2026
a377aca
Fix TestCheckAuthSuccess to work in CI
simonfaltum Mar 13, 2026
de0754d
Fix config resolution, error handling, and test isolation
simonfaltum Mar 13, 2026
a6e326a
Fix errcheck lint and add doctor to help golden file
simonfaltum Mar 13, 2026
d571c06
Use SDK HTTP client for network checks, return error on check failure
simonfaltum Mar 13, 2026
606a69b
Use config-based HTTP client in network check fallback path
simonfaltum Mar 13, 2026
4b394b8
Fix doctor command: account-level auth, per-check timeouts, network f…
simonfaltum Mar 13, 2026
cd9a1a6
Fix lint: use errors.New per perfsprint linter rule
simonfaltum Mar 13, 2026
3525dd3
Fix review issues: unified-host, HTTP method, config path, skip status
simonfaltum Mar 16, 2026
ce26292
Apply configured default profile in doctor's config resolution
simonfaltum Mar 16, 2026
2ee6693
Add regression tests for unified-host account profiles
simonfaltum Mar 16, 2026
d870502
Remove custom config loaders and add acceptance test
simonfaltum Mar 16, 2026
452bd21
Fix context-backed env resolution and unified-host account classifica…
simonfaltum Mar 16, 2026
c7e351b
Remove default profile resolution (not yet available on this branch)
simonfaltum Mar 16, 2026
113fce1
Fix panic in env config loader for non-string attribute types
simonfaltum Mar 16, 2026
b2e9d7a
Fix Windows path separator in doctor config file output
simonfaltum Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions acceptance/cmd/doctor/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions acceptance/cmd/doctor/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

=== Doctor with --profile flag

>>> [CLI] doctor --profile my-workspace --output json
CLI Version: info - [DEV_VERSION]
Config File: pass - ~/.databrickscfg (1 profiles)
Current Profile: info - my-workspace
Authentication: pass - OK (pat)
Identity: pass - test@example.com
Network: pass - [DATABRICKS_URL] is reachable
10 changes: 10 additions & 0 deletions acceptance/cmd/doctor/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sethome "./home"

cat > "./home/.databrickscfg" <<EOF
[my-workspace]
host = $DATABRICKS_HOST
token = $DATABRICKS_TOKEN
EOF

title "Doctor with --profile flag\n"
trace $CLI doctor --profile my-workspace --output json | jq -r '.[] | "\(.name): \(.status) - \(.message)"'
18 changes: 18 additions & 0 deletions acceptance/cmd/doctor/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Local = true
Cloud = false

Ignore = [
"home"
]

[[Server]]
Pattern = "GET /api/2.0/preview/scim/v2/Me"
Response.Body = '''
{
"userName": "test@example.com"
}
'''

[[Server]]
Pattern = "HEAD /"
Response.Body = ''
1 change: 1 addition & 0 deletions acceptance/help/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Postgres

Developer Tools
bundle Declarative Automation Bundles let you express data/AI/analytics projects as code.
doctor Validate your Databricks CLI setup
sync Synchronize a local directory to a workspace directory

Additional Commands:
Expand Down
2 changes: 2 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/databricks/cli/cmd/cache"
"github.com/databricks/cli/cmd/completion"
"github.com/databricks/cli/cmd/configure"
"github.com/databricks/cli/cmd/doctor"
"github.com/databricks/cli/cmd/experimental"
"github.com/databricks/cli/cmd/fs"
"github.com/databricks/cli/cmd/labs"
Expand Down Expand Up @@ -101,6 +102,7 @@ func New(ctx context.Context) *cobra.Command {
cli.AddCommand(experimental.New())
cli.AddCommand(psql.New())
cli.AddCommand(configure.New())
cli.AddCommand(doctor.New())
cli.AddCommand(fs.New())
cli.AddCommand(labs.New(ctx))
cli.AddCommand(sync.New())
Expand Down
Loading
Loading