databricks-cli/libs
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
..
auth Add a foundation for built-in templates (#685) 2023-08-25 09:03:42 +00:00
cmdio Added `databricks account o-auth-enrollment enable` command (#687) 2023-08-21 16:17:02 +00:00
databrickscfg Always resolve .databrickscfg file (#659) 2023-08-14 12:45:08 +00:00
errs Added ability for deferred mutator execution (#380) 2023-05-16 18:01:50 +02:00
filer Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
fileset Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
flags Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
git Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
jsonschema Return better error messages for invalid JSON schema types in templates (#661) 2023-08-15 14:28:04 +00:00
locker Correct name for force acquire deploy flag (#656) 2023-08-15 19:03:43 +00:00
log Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
notebook Error out if notebook file does not exist locally (#261) 2023-03-21 18:13:16 +01:00
set Added support for sync.include and sync.exclude sections (#671) 2023-08-18 08:07:25 +00:00
sync Added support for sync.include and sync.exclude sections (#671) 2023-08-18 08:07:25 +00:00
template Add a foundation for built-in templates (#685) 2023-08-25 09:03:42 +00:00
terraform Add bundle destroy command (#300) 2023-04-06 12:54:58 +02:00
testfile Refactor and cover edge cases in sync integration tests (#160) 2023-01-10 13:16:30 +01:00