databricks-cli/cmd/workspace
shreyas-goenka a6eb673d55
Print text logs in `import-dir` and `export-dir` commands (#1682)
## Changes
In https://github.com/databricks/cli/pull/1202 the semantics of
`cmdio.RenderJson` was changes to always render the JSON object. Before
we would only render it if `--output json` was specified.

This PR fixes the logs to print human-readable log lines instead of a
JSON object.
This PR also removes the now unused `cmdio.Render` method.

## Tests
Manually:
```
➜  bundle-playground git:(master) ✗ cli workspace import-dir ./tmp /Users/shreyas.goenka@databricks.com/test-import-1 -p aws-prod-ucws
Importing files from ./tmp
a -> /Users/shreyas.goenka@databricks.com/test-import-1/a
Import complete. The files are available at /Users/shreyas.goenka@databricks.com/test-import-1
```
```
➜  bundle-playground git:(master) ✗ cli workspace export-dir  /Users/shreyas.goenka@databricks.com/test-export-1 ./tmp-2 -p aws-prod-ucws
Exporting files from /Users/shreyas.goenka@databricks.com/test-export-1
/Users/shreyas.goenka@databricks.com/test-export-1/b -> tmp-2/b
Exported complete. The files are available at ./tmp-2
```
2024-08-15 12:53:02 +00:00
..
alerts Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
apps Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
artifact-allowlists Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
automatic-cluster-update Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
catalogs Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
clean-rooms Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
cluster-policies Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
clusters Update OpenAPI spec (#1466) 2024-06-03 14:14:48 +00:00
compliance-security-profile Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
connections Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
consumer-fulfillments Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
consumer-installations Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
consumer-listings Update OpenAPI spec (#1466) 2024-06-03 14:14:48 +00:00
consumer-personalization-requests Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
consumer-providers Update OpenAPI spec (#1466) 2024-06-03 14:14:48 +00:00
credentials-manager Update Go SDK to v0.34.0 (#1256) 2024-03-06 09:53:44 +00:00
current-user Update Go SDK to v0.34.0 (#1256) 2024-03-06 09:53:44 +00:00
dashboard-widgets Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
dashboards Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
data-sources Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
default-namespace Update Go SDK to v0.36.0 (#1304) 2024-03-22 13:15:54 +00:00
enhanced-security-monitoring Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
experiments Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
external-locations Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
functions Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
git-credentials Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
global-init-scripts Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
grants Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
groups Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
instance-pools Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
instance-profiles Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
ip-access-lists Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
jobs Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
lakeview Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
libraries Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
metastores Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
model-registry Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
model-versions Bump github.com/databricks/databricks-sdk-go from 0.39.0 to 0.40.1 (#1431) 2024-05-16 09:04:58 +00:00
online-tables Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
permission-migration Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
permissions Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
pipelines Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
policy-families Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
provider-exchange-filters Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-exchanges Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-files Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-listings Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-personalization-requests Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-provider-analytics-dashboards Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
provider-providers Don't hide commands of services that are already hidden (#1438) 2024-05-17 09:02:30 +00:00
providers Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
quality-monitors Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
queries Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
query-history Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
query-visualizations Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
recipient-activation Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
recipients Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
registered-models Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
repos Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
restrict-workspace-admins Update Go SDK to v0.36.0 (#1304) 2024-03-22 13:15:54 +00:00
schemas Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
secrets Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
service-principals Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
serving-endpoints Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
settings Bump github.com/databricks/databricks-sdk-go from 0.39.0 to 0.40.1 (#1431) 2024-05-16 09:04:58 +00:00
shares Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
storage-credentials Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
system-schemas Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
table-constraints Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
tables Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
token-management Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
tokens Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
users Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
vector-search-endpoints Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
vector-search-indexes Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
volumes Update Go SDK to v0.35.0 (#1300) 2024-03-20 13:57:53 +00:00
warehouses Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
workspace Print text logs in `import-dir` and `export-dir` commands (#1682) 2024-08-15 12:53:02 +00:00
workspace-bindings Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
workspace-conf Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
cmd.go Update Go SDK to v0.41.0 (#1445) 2024-05-22 07:41:32 +00:00
groups.go Bump github.com/databricks/databricks-sdk-go from 0.37.0 to 0.38.0 (#1361) 2024-04-16 12:03:21 +00:00