databricks-cli/cmd/root
shreyas-goenka af3914db61
Move `WorkspaceClient` to `libs/command` (#2444)
## Changes
Move the WorkspaceClient reader and setter from the root package to
`libs/command`.

## Why
This allows us to read the workspace client set in the context in all
CLI packages. This was not possible before because using
`root.WorkspaceClient` would often result in an import cycle.

This would also allow us to standardise reads of the workspace client to
be from the context in bundle commands. Today those are read from the
bundle object tree instead.

This is a natural followup to
https://github.com/databricks/cli/pull/2440.

## Tests
Existing tests and one new unit test.

NO_CHANGELOG=true
2025-03-07 16:47:19 +00:00
..
args.go Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
auth.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
auth_options.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_options_test.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_test.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
bundle.go Move `ConfigUsed` to `libs/command` (#2440) 2025-03-06 17:08:55 +00:00
bundle_test.go Move `ConfigUsed` to `libs/command` (#2440) 2025-03-06 17:08:55 +00:00
io.go Remove calls to `t.Setenv` from integration tests (#2018) 2024-12-16 12:34:37 +01:00
logger.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
progress_logger.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
progress_logger_test.go Add error checking in tests and enable errcheck there (#1980) 2024-12-09 13:56:41 +01:00
root.go Recover from panic gracefully (#2353) 2025-02-27 13:27:36 +00:00
silent_err.go Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
user_agent.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
user_agent_command.go Move code for including command name in user agent (#203) 2023-02-15 10:33:35 +01:00
user_agent_command_exec_id.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_command_exec_id_test.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_command_test.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_upstream.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
user_agent_upstream_test.go Let caller set BRICKS_UPSTREAM for user agent (#196) 2023-02-03 17:05:58 +01:00