databricks / cli

Databricks CLI
Other
115 stars 39 forks source link

Set bool pointer to disable lock #1516

Closed pietern closed 1 week ago

pietern commented 1 week ago

Changes

This cherry-picks from #1490 to address an issue that came up in #1511.

The function dyn.SetByPath requires intermediate values to be present. If they are not, it returns an error that it cannot index a map. This is not an issue on main, where the intermediate maps are always created, even if they are not present in the dynamic configuration tree. As of #1511, we'll no longer populate empty maps for empty structs if they are not explicitly set (i.e., a non-nil pointer). This change writes a bool pointer to avoid this issue altogether.

Tests

Unit tests pass.