databricks-cli/cmd
Gleb Kanterov e8b76a7f13
Improve `bundle validate` output (#1532)
## Changes
This combination of changes allows pretty-printing errors happening
during the "load" and "init" phases, including their locations.

Move to render code into a separate module dedicated to rendering
`diag.Diagnostics` in a human-readable format. This will be used for the
`bundle deploy` command.

Preserve the "bundle" value if an error occurs in mutators. Rewrite the
go templates to handle the case when the bundle isn't yet loaded if an
error occurs during loading, that is possible now.

Improve rendering for errors and warnings:
- don't render empty locations
- render "details" for errors if they exist

Add `root.ErrAlreadyPrinted` indicating that the error was already
printed, and the CLI entry point shouldn't print it again.

## Tests
Add tests for output, that are especially handy to detect extra newlines
2024-07-01 09:01:10 +00:00
..
account Update OpenAPI spec (#1466) 2024-06-03 14:14:48 +00:00
api Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
auth Update error checks that use the `os` package to use `errors.Is` (#1461) 2024-06-03 12:39:36 +00:00
bundle Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
configure Fix `databricks configure` to use DATABRICKS_CONFIG_FILE environment variable if exists as config file (#1325) 2024-06-24 10:56:49 +00:00
fs Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
labs Improve token refresh flow (#1434) 2024-05-16 10:22:09 +00:00
root Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
sync Avoid multiple file tree traversals on bundle deploy (#1493) 2024-06-17 09:48:52 +00:00
version Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
workspace Bump github.com/databricks/databricks-sdk-go from 0.42.0 to 0.43.0 (#1522) 2024-06-25 12:51:17 +00:00
cmd.go Add `databricks labs` command group (#914) 2023-11-17 12:47:37 +00:00