databricks / cli

Databricks CLI
Other
132 stars 50 forks source link

Remove schema override for variable default value #1536

Closed shreyas-goenka closed 2 months ago

shreyas-goenka commented 3 months ago

Changes

This PR:

  1. Removes the custom added in https://github.com/databricks/cli/pull/1396/files for variables.*.default. It's no longer needed because with complex variables (https://github.com/databricks/cli/pull/1467) default has a type of any.
  2. Retains, and extends the override on targets.*.variables.*. Target override values can now be complex objects, not just primitive values.

Tests

Manually

Before: Only primitive types were allowed.

Screenshot 2024-06-27 at 3 58 34 PM

After: An empty JSON schema is generated. All YAML values are acceptable.

Screenshot 2024-06-27 at 3 57 15 PM
shreyas-goenka commented 2 months ago

@pietern My bad, overlooked that. Fixed it now.

target overrides:

Screenshot 2024-07-05 at 10 58 56 AM

target override schema:

          "variables": {
            "type": "object",
            "additionalProperties": {}
          },`