databricks-cli/libs
Pieter Noordhuis ff6e0354b9
Add functionality to visit values in `dyn.Value` tree (#1142)
## Changes

This change adds the following functions:
* `dyn.Get(value, "foo.bar") -> (dyn.Value, error)`
* `dyn.Set(value, "foo.bar", newValue) -> (dyn.Value, error)`
* `dyn.Map(value, "foo.bar", func) -> (dyn.Value, error)`

And equivalent functions that take a previously constructed `dyn.Path`:
* `dyn.GetByPath(value, dyn.Path) -> (dyn.Value, error)`
* `dyn.SetByPath(value, dyn.Path, newValue) -> (dyn.Value, error)`
* `dyn.MapByPath(value, dyn.Path, func) -> (dyn.Value, error)`

Changes made by the "set" and "map" functions are never reflected in the
input argument; they return new `dyn.Value` instances for all nodes in
the path leading up to the changed value.

## Tests

New unit tests cover all critical paths.
2024-01-24 18:38:46 +00:00
..
auth Fix IsServicePrincipal() only working for workspace admins (#732) 2023-09-05 11:20:55 +00:00
cmdio Improve experience for multiple builtin templates (#1052) 2023-12-27 12:03:08 +00:00
databrickscfg Skip profile resolution if `DATABRICKS_AUTH_TYPE` is set (#1068) 2023-12-18 09:57:07 +00:00
diag Rename libs/config -> libs/dyn (#1086) 2023-12-22 13:20:45 +00:00
dyn Add functionality to visit values in `dyn.Value` tree (#1142) 2024-01-24 18:38:46 +00:00
env Fix `panic: $HOME is not set` (#1027) 2023-11-29 19:08:27 +00:00
errs Added ability for deferred mutator execution (#380) 2023-05-16 18:01:50 +02:00
exec Make libs/exec fallback to `sh` if `bash` cannot be found (#1114) 2024-01-11 12:26:31 +00:00
filer Correctly overwrite local state if remote state is newer (#1008) 2023-11-24 11:15:46 +00:00
fileset Support .gitignore syntax in sync section and make sure it works recursively (#854) 2023-10-10 08:45:15 +00:00
flags Add override to support YAML inputs for apps (#921) 2023-10-27 18:57:26 +00:00
git Removed unused `ToHttpsUrl` method and corresponding library (#1017) 2023-11-28 16:08:27 +00:00
jsonschema Add support for reprompts if user input does not match template schema (#946) 2023-12-22 15:43:08 +00:00
locker Correct name for force acquire deploy flag (#656) 2023-08-15 19:03:43 +00:00
log Rewrite the friendly log handler (#1038) 2023-12-01 12:17:04 +00:00
notebook Added `databricks bundle generate job` command (#1043) 2024-01-17 14:26:33 +00:00
process Stub out Python virtual environment installation for `labs` commands (#1057) 2023-12-11 16:30:19 +00:00
python Added `python.DetectInterpreters` and other utils (#805) 2023-10-03 10:47:09 +00:00
set Added support for sync.include and sync.exclude sections (#671) 2023-08-18 08:07:25 +00:00
sync Support .gitignore syntax in sync section and make sure it works recursively (#854) 2023-10-10 08:45:15 +00:00
tags Library to validate and normalize cloud specific tags (#819) 2023-09-29 08:49:08 +00:00
template Add debug log line for when bundle init is run from non-TTY interface (#1117) 2024-01-11 15:41:13 +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
textutil Added `databricks bundle generate job` command (#1043) 2024-01-17 14:26:33 +00:00