mirror of https://github.com/databricks/cli.git
e4d039a1aa
## Changes The issue reported in #1828 illustrates how using a YAML timestamp-like value (a date in this case) causes an issue during conversion to and from the typed configuration tree. We use the `AsAny()` function on the `dyn.Value` when normalizing for the `any` type. We only use the `any` type for variable values, because they can assume every type. The `AsAny()` function returns a `time.Time` for the time value during conversion **to** the typed configuration tree. Upon conversion **from** the typed configuration tree back into the dynamic configuration tree, we cannot distinguish a `time.Time` struct from any other struct. To address this, we use the underlying string value of the time value when we normalize for the `any` type. Fixes #1828. ## Tests Existing unit tests pass |
||
---|---|---|
.. | ||
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 |