Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove schema override for variable default value #1536

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Jun 27, 2024

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 (Added support for complex variables #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

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the effect on the variables set in target overrides?

@shreyas-goenka
Copy link
Contributor Author

shreyas-goenka commented Jul 5, 2024

@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": {}
          },`

@shreyas-goenka shreyas-goenka requested a review from pietern July 5, 2024 09:00
@pietern pietern added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 1da04a4 Jul 10, 2024
5 checks passed
@pietern pietern deleted the fix/remove-var-default-override branch July 10, 2024 07:04
andrewnester added a commit that referenced this pull request Jul 10, 2024
Bundles:
 * Override complex variables with target overrides instead of merging ([#1567](#1567)).
 * Rewrite local path for libraries in foreach tasks ([#1569](#1569)).
 * Change SetVariables mutator to mutate dynamic configuration instead ([#1573](#1573)).
 * Return early in bundle destroy if no deployment exists ([#1581](#1581)).
 * Let notebook detection code use underlying metadata if available ([#1574](#1574)).
 * Remove schema override for variable default value ([#1536](#1536)).
 * Print diagnostics in 'bundle deploy' ([#1579](#1579)).

Internal:
 * Update actions/upload-artifact to v4 ([#1559](#1559)).
 * Use Go 1.22 to build and test ([#1562](#1562)).
 * Move bespoke status call to main workspace files filer ([#1570](#1570)).
 * Add new template ([#1578](#1578)).
 * Add regression tests for CLI error output ([#1566](#1566)).

Dependency updates:
 * Bump golang.org/x/mod from 0.18.0 to 0.19.0 ([#1576](#1576)).
 * Bump golang.org/x/term from 0.21.0 to 0.22.0 ([#1577](#1577)).
@andrewnester andrewnester mentioned this pull request Jul 10, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 10, 2024
Bundles:
* Override complex variables with target overrides instead of merging
([#1567](#1567)).
* Rewrite local path for libraries in foreach tasks
([#1569](#1569)).
* Change SetVariables mutator to mutate dynamic configuration instead
([#1573](#1573)).
* Return early in bundle destroy if no deployment exists
([#1581](#1581)).
* Let notebook detection code use underlying metadata if available
([#1574](#1574)).
* Remove schema override for variable default value
([#1536](#1536)).
* Print diagnostics in 'bundle deploy'
([#1579](#1579)).

Internal:
* Update actions/upload-artifact to v4
([#1559](#1559)).
* Use Go 1.22 to build and test
([#1562](#1562)).
* Move bespoke status call to main workspace files filer
([#1570](#1570)).
* Add new template
([#1578](#1578)).
* Add regression tests for CLI error output
([#1566](#1566)).

Dependency updates:
* Bump golang.org/x/mod from 0.18.0 to 0.19.0
([#1576](#1576)).
* Bump golang.org/x/term from 0.21.0 to 0.22.0
([#1577](#1577)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants