databricks-cli/cmd/bundle
Denis Bilenko d282f33a22
Append newline to "-o json" for validate/summary/run (#2326)
## Changes
- Insert newline after rendering indented JSON in bundle
validate/summary/run.
- This prevents "No newline at end of file" message in various cases,
for example when switching between recording raw output of the command
to output processed by jq, since jq does add a newline or when running
diff in acceptance tests.

## Tests
Manually running validate:

```
~/work/dabs_cuj_brickfood % ../cli/cli-main bundle validate -o json | tail -n 2  # without change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'

  }
}%
~/work/dabs_cuj_brickfood % ../cli/cli bundle validate -o json | tail -n 2  # with change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'

  }
}
~/work/dabs_cuj_brickfood %
```

Via #2316 -- see cleaner output there.
2025-02-10 14:00:49 +01:00
..
debug Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
deployment Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate Added support to generate Git based jobs (#2304) 2025-02-07 18:37:03 +00:00
utils Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
bundle.go Add command to open a resource in the browser (#1846) 2024-10-24 12:20:33 +00:00
debug.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deploy.go Add validation mutator for volume `artifact_path` (#2050) 2025-01-02 17:23:15 +05:30
destroy.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
generate.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
init.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
launch.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
open.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
run.go Append newline to "-o json" for validate/summary/run (#2326) 2025-02-10 14:00:49 +01:00
schema.go Make bundle JSON schema modular with `$defs` (#1700) 2024-09-10 13:55:18 +00:00
summary.go Append newline to "-o json" for validate/summary/run (#2326) 2025-02-10 14:00:49 +01:00
sync.go Add "output" flag to the bundle sync command (#1853) 2024-10-23 11:08:12 +00:00
test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
validate.go Append newline to "-o json" for validate/summary/run (#2326) 2025-02-10 14:00:49 +01:00
variables.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00