databricks / cli

Databricks CLI
Other
115 stars 39 forks source link

Emit warnings when conflicting configuration is specified #1506

Open shreyas-goenka opened 1 week ago

shreyas-goenka commented 1 week ago

Depends on https://github.com/databricks/cli/pull/1503

A warning mutator for when ineffective configuration pieces are specified.

Note: We do not give a warning when one of the conflicting value is nil. It already has a separate existing warning (https://github.com/databricks/cli/pull/1329). If we wish to show conflict warnings for nil as well, we'll need to preserve nil values during normalization which is not the case today (code where we lose out on nil information during normalizaton: https://github.com/databricks/cli/blob/533d357a71b32a4d616d98dc4bef9d552baaf531/libs/dyn/convert/normalize.go#L248)

What does the warning look like?

Warning: Multiple values found for the same configuration bundle.name. Only the value from location resources.yml:2:9 will be used. Locations found: [resources.yml:2:9 databricks.yml:3:9]
  at bundle.name
  in resources.yml:2:9