databricks-cli/bundle/config
Lennart Kats (databricks) a5b86093ec
Add a foundation for built-in templates (#685)
## Changes

This pull request extends the templating support in preparation of a
new, default template (WIP, https://github.com/databricks/cli/pull/686):
* builtin templates that can be initialized using e.g. `databricks
bundle init default-python`
* builtin templates are embedded into the executable using go's `embed`
functionality, making sure they're co-versioned with the CLI
* new helpers to get the workspace name, current user name, etc. help
craft a complete template
* (not enabled yet) when the user types `databricks bundle init` they
can interactively select the `default-python` template

And makes two tangentially related changes:
* IsServicePrincipal now uses the "users" API rather than the
"principals" API, since the latter is too slow for our purposes.
* mode: prod no longer requires the 'target.prod.git' setting. It's hard
to set that from a template. (Pieter is planning an overhaul of warnings
support; this would be one of the first warnings we show.)

The actual `default-python` template is maintained in a separate PR:
https://github.com/databricks/cli/pull/686

## Tests
Unit tests, manual testing
2023-08-25 09:03:42 +00:00
..
interpolation Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
mutator Add a foundation for built-in templates (#685) 2023-08-25 09:03:42 +00:00
resources Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
testdata First look for databricks.yml before falling back to bundle.yml (#580) 2023-07-18 12:16:34 +02:00
variable Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
artifact.go Added support for build command chaining and error on missing wheel (#607) 2023-07-26 12:58:52 +00:00
bundle.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
git.go Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00
lock.go Acquire lock prior to deploy (#270) 2023-03-22 16:37:26 +01:00
lock_test.go Acquire lock prior to deploy (#270) 2023-03-22 16:37:26 +01:00
resources.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
resources_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
root.go Added run_as section for bundle configuration (#692) 2023-08-23 16:47:07 +00:00
root_test.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
sync.go Added support for sync.include and sync.exclude sections (#671) 2023-08-18 08:07:25 +00:00
target.go Added run_as section for bundle configuration (#692) 2023-08-23 16:47:07 +00:00
workspace.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00