databricks / cli

Databricks CLI
Other
132 stars 50 forks source link

Use dynamic walking to validate unique resource keys #1614

Closed shreyas-goenka closed 2 months ago

shreyas-goenka commented 2 months ago

Changes

This PR:

  1. Uses dynamic walking (via the dyn.MapByPattern func) to validate no two resources have the same resource key. The allows us to remove this validation at merge time.
  2. Modifies dyn.Mapping to always return a sorted slice of pairs. This makes traversal functions like dyn.Walk or dyn.MapByPattern deterministic.

Tests

Unit tests. Also manually.