mirror of https://github.com/databricks/cli.git
446a9d0c52
## Changes When a configuration defines: ```yaml run_as: ``` It first showed up as `run_as -> nil` in the dynamic configuration only to later be converted to `run_as -> {}` while going through typed conversion. We were using the presence of a key to initialize an empty value. This is incorrect and it should have remained a nil value. This conversion was happening in `convert.FromTyped` where any struct always returned a map value. Instead, it should only return a map value in any one of these cases: 1) the struct has elements, 2) the struct was originally a map in the dynamic configuration, or 3) the struct was initialized to a non-empty pointer value. Stacked on top of #1516 and #1518. ## Tests * Unit tests pass. * Integration tests pass. * Manually ran through bundle CRUD with a bundle without resources. |
||
---|---|---|
.. | ||
end_to_end_test.go | ||
error.go | ||
from_typed.go | ||
from_typed_test.go | ||
normalize.go | ||
normalize_test.go | ||
struct_info.go | ||
struct_info_test.go | ||
to_typed.go | ||
to_typed_test.go |