databricks-cli/libs/template
Pieter Noordhuis ca534d596b
Load bundle configuration from mutator (#1318)
## Changes

Prior to this change, the bundle configuration entry point was loaded
from the function `bundle.Load`. Other configuration files were only
loaded once the caller applied the first set of mutators. This
separation was unnecessary and not ideal in light of gathering
diagnostics while loading _any_ configuration file, not just the ones
from the includes.

This change:
* Updates `bundle.Load` to only verify that the specified path is a
valid bundle root.
* Moves mutators that perform loading to `bundle/config/loader`.
* Adds a "load" phase that takes the place of applying
`DefaultMutators`.

Follow ups:
* Rename `bundle.Load` -> `bundle.Find` (because it no longer performs
loading)

This change depends on #1316 and #1317.

## Tests

Tests pass.
2024-03-27 10:49:05 +00:00
..
templates Fix DBConnect support in VS Code (#1253) 2024-03-05 14:31:27 +00:00
testdata Allow unknown properties in the config file for template initialization (#1315) 2024-03-26 13:02:09 +00:00
config.go Allow unknown properties in the config file for template initialization (#1315) 2024-03-26 13:02:09 +00:00
config_test.go Allow unknown properties in the config file for template initialization (#1315) 2024-03-26 13:02:09 +00:00
file.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
file_test.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
helpers.go Use UserName field to identify if service principal is used (#1310) 2024-03-25 11:32:45 +00:00
helpers_test.go Use Go SDK Iterators when listing resources with the CLI (#1202) 2024-02-21 14:16:36 +00:00
materialize.go Improve error message when path is not a bundle template (#985) 2023-11-22 12:25:16 +00:00
materialize_test.go Improve error message when path is not a bundle template (#985) 2023-11-22 12:25:16 +00:00
renderer.go Improve the output of the `databricks bundle init` command (#795) 2023-10-19 07:08:36 +00:00
renderer_test.go Load bundle configuration from mutator (#1318) 2024-03-27 10:49:05 +00:00