databricks-cli/cmd/bundle
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
..
debug Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deployment Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
utils Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
bundle.go Fix bundle documentation URL (#1399) 2024-04-25 11:25:26 +00:00
debug.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deploy.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
destroy.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
init.go Make dbt-sql and default-sql templates public (#1463) 2024-06-04 08:57:13 +00:00
init_test.go Make dbt-sql and default-sql templates public (#1463) 2024-06-04 08:57:13 +00:00
launch.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
run.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
schema.go Fix bundle schema for variables (#1396) 2024-04-25 11:23:50 +00:00
summary.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
sync.go Avoid multiple file tree traversals on bundle deploy (#1493) 2024-06-17 09:48:52 +00:00
test.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
validate.go Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
variables.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00