Skip to content

Commit 901321f

Browse files
authored
[Python] Fix JSON schema for experimental/python (#2761)
## Changes Make `experimental/python/mutators` and `experimental/python/resources` fields optional in the JSON schema. ## Why The JSON schema wasn't correctly reflecting their optionality.
1 parent 28c7d35 commit 901321f

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010

1111
### Bundles
1212
* Raise an error when Unity Catalog volumes are used for paths other than artifacts ([#2754](https://github.com/databricks/cli/pull/2754))
13+
* Made `experimental/python/mutators` and `experimental/python/resources` fields optional in JSON schema ([#2761](https://github.com/databricks/cli/pull/2761))
1314

1415
### API Changes

acceptance/bundle/python/restricted-execution/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{
55
"pydabs": {},
66
"python": {
7-
"resources": null,
87
"mutators": [
98
"mutators:read_envs"
109
]

bundle/config/experimental.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ type Python struct {
3939
// defined in Python code.
4040
//
4141
// Example: ["my_project.resources:load_resources"]
42-
Resources []string `json:"resources"`
42+
Resources []string `json:"resources,omitempty"`
4343

4444
// Mutators contains a list of fully qualified function paths to mutator functions.
4545
//
4646
// Example: ["my_project.mutators:add_default_cluster"]
47-
Mutators []string `json:"mutators"`
47+
Mutators []string `json:"mutators,omitempty"`
4848

4949
// VEnvPath is path to the virtual environment.
5050
//

bundle/schema/jsonschema.json

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)