databricks-cli/libs/dyn/merge
Gleb Kanterov b9e3c98723
PythonMutator: support omitempty in PyDABs (#1513)
## Changes
PyDABs output can omit empty sequences/mappings because we don't track
them as optional. There is no semantic difference between empty and
missing, which makes omitting correct. CLI detects that we falsely
modify input resources by deleting all empty collections.

To handle that, we extend `dyn.Override` to allow visitors to ignore
certain deletes. If we see that an empty sequence or mapping is deleted,
we revert such delete.

## Tests
Unit tests

---------

Co-authored-by: Pieter Noordhuis <pcnoordhuis@gmail.com>
2024-07-03 07:22:03 +00:00
..
elements_by_key.go Include `dyn.Path` as argument to the visit callback function (#1260) 2024-03-07 13:56:50 +00:00
elements_by_key_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
merge.go Return `dyn.InvalidValue` instead of `dyn.NilValue` when errors happen (#1514) 2024-06-21 14:22:42 +00:00
merge_test.go Return `dyn.InvalidValue` instead of `dyn.NilValue` when errors happen (#1514) 2024-06-21 14:22:42 +00:00
override.go PythonMutator: support omitempty in PyDABs (#1513) 2024-07-03 07:22:03 +00:00
override_test.go PythonMutator: support omitempty in PyDABs (#1513) 2024-07-03 07:22:03 +00:00