Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
12c3ecc
structpath: add NewPattern with AnyKey/AnyIndex wildcards
denik Oct 15, 2026
0bcfee3
bundle: delete libs/dyn; configuration is typed structs with structva…
denik Oct 7, 2026
dfb23ee
structvar: map YAML locations in the YAML source; drop mappedSource
denik Oct 7, 2026
c4647e0
Use NewStringKeysSlice for single key paths
denik Oct 7, 2026
909b404
Build literal diagnostic paths with NewStringKeysSlice
denik Oct 7, 2026
b3462ce
Restack fixes: structvar grammar for structpath's PureReferenceToPath…
denik Oct 7, 2026
000e7fe
Restore import block after restack
denik Oct 7, 2026
a7cc8c3
Use structpath.NewPath for key/index paths
denik Oct 7, 2026
0ebb55e
Build the target preset path in one NewPath call
denik Oct 8, 2026
559f8b9
GetLocationsOf on the location tree
denik Oct 8, 2026
ece7def
Minimal import edits; drop unused diag import
denik Oct 8, 2026
0d10563
structvar: test the YAML decoder with the yamlloader fixtures
denik Oct 9, 2026
d3542e8
structvar: add the YAML test helpers
denik Oct 9, 2026
ef8edbc
Port the job environment_variables files pattern (#6985) to structpath
denik Oct 9, 2026
f8ccd45
Fix codex review findings
denik Oct 9, 2026
e48f9fc
Port the job environments project_environment pattern (#6983) to stru…
denik Oct 12, 2026
9f063a8
Fix regressions recorded by the config edge-case tests
denik Oct 14, 2026
652be76
Drop the embedded JobSettings literal flagged by embedlit
denik Oct 15, 2026
3fd34c0
Keep main's path-node location lookups; build app permission paths fr…
denik Oct 15, 2026
d7f52c9
config: Nearest/Exact location lookups by path node; build paths from…
denik Oct 15, 2026
693217c
structvar: don't allocate per struct field when traversing views
denik Oct 16, 2026
c89f774
structvar: traverse views without closures, map lookups or rebuilding…
denik Oct 16, 2026
02b788d
bundletest: per-component benchmarks that also run on the dyn impleme…
denik Oct 17, 2026
04dd6ec
validate: generated typed walkers for required and enum fields
denik Oct 17, 2026
494fd62
validate: required fields written in the source are set, even if zero
denik Oct 18, 2026
71b04cd
structvar: compare io.EOF with errors.Is
denik Oct 18, 2026
717f86d
walk: shared node type for generated configuration walkers
denik Oct 18, 2026
81675c6
Changelog fragment for #7098
denik Oct 18, 2026
f87eaa9
paths: typed visitors instead of pattern traversal
denik Oct 18, 2026
df7ae9b
walk: generated string walker for references
denik Oct 18, 2026
8db2c66
paths: visit explicitly written empty path values
denik Oct 18, 2026
03610db
ApplyBundlePermissions: typed access to resource permissions
denik Oct 18, 2026
70775aa
Fix review findings: presence rules of the typed walkers
denik Oct 18, 2026
738b416
config: generated iterators over all resources, permissions and grants
denik Oct 18, 2026
b3243de
config: keep main's GetLocationOf names; GetLocationOfExact for exact…
denik Oct 18, 2026
704bf5b
Iterate resources, permissions, grants and states with the generated …
denik Oct 18, 2026
c2ba3cd
Typed access in single-type and fixed-field mutators
denik Oct 18, 2026
f0f002c
Typed library iterators for library expansion, upload and duplicate c…
denik Oct 18, 2026
bb9c4b4
Typed defaults and single node cluster validation; walk helpers shared
denik Oct 18, 2026
b92c317
PopulateLocations reads the locations tree and the typed resources
denik Oct 18, 2026
cd7c38a
python: resource keys and the experimental.python copy from typed config
denik Oct 18, 2026
d08e18a
Fix lint: unused required helpers, perfsprint, gofmt, dupword
denik Oct 18, 2026
ea578d6
ResolveVariableReferences collects references with the generated stri…
denik Oct 18, 2026
3b420d5
ConfigureClusterPolicyDefinition: one helper called per field
denik Oct 18, 2026
f4475d4
Typed access for the remaining reads of known fields
denik Oct 18, 2026
7515ed4
Fix review findings: python copy refs, grants iterator, built paths
denik Oct 18, 2026
a80c650
Presence comes from ForceSendFields only, never from locations
denik Oct 18, 2026
b531159
Presence follow-ups: FSF for strings, refs below structs, review fixes
denik Oct 18, 2026
62308e3
structvar: decode YAML mappings without an index map and key location…
denik Oct 18, 2026
9349a8e
References under removed values are not returned; libraries: null errors
denik Oct 18, 2026
21dd05f
References: reachability by the view's presence rules
denik Oct 18, 2026
b3b7b79
References need the view to show them; Set adds no location marker
denik Oct 18, 2026
19eddd7
Strings walk stops at pure references; clean the default file path
denik Oct 18, 2026
2532afd
Strings walk: stop at a referenced struct node; scoped reference trees
denik Oct 19, 2026
46456f7
paths: visit takes named arguments
denik Oct 19, 2026
edb661f
Restore GetLocation/GetLocations (path string) and their callers
denik Oct 19, 2026
37a3205
paths: pass the path as a value, not a closure
denik Oct 19, 2026
d3f38e4
Update the validate edge-case tests for the typed configuration
denik Oct 19, 2026
93e9def
Presets set by an include now clear base values: drop the Badness
denik Oct 20, 2026
cc09f9a
Reconcile with main after the rebase
denik Oct 20, 2026
8d9cc29
Regenerate the strings walker for ForceSendFields on Presets, Lifecyc…
denik Oct 20, 2026
168081f
Drop a slice element or map entry whose resolved reference has the wr…
denik Oct 20, 2026
3141b41
Comment that clients is required and print the validated workload_type
denik Oct 20, 2026
4c4917c
acc: say what each test checks and print the relevant JSON; record th…
denik Oct 20, 2026
29d0606
Build on the lower stack layers: typed mutator versions, tests and ge…
denik Oct 21, 2026
81dc77f
acc: take the lower layer's test fixtures and regenerate their goldens
denik Oct 21, 2026
5d9d0fc
Normalize the host URL on a copy so the configuration keeps the host …
denik Oct 22, 2026
1f67ab0
Skip empty map keys in the generated walkers of the typed configuration
denik Oct 22, 2026
daffd1e
Keep an explicit null added by a merge set, as when it is decoded
denik Oct 22, 2026
bb64c72
Port the undeployed-reference check of the terraform migration to str…
denik Oct 22, 2026
05a1eae
Port main's per-resource-type Python telemetry and lifecycle.depends_…
denik Oct 27, 2026
75abfeb
Use the renamed whole-map test directory of the lower layer
denik Oct 27, 2026
ad77864
Regenerate the strings walker for the immutable folder snapshot types
denik Oct 27, 2026
d3dfd31
Hybrid spike: load, include and target merge in dyn, convert once to …
denik Oct 27, 2026
64419f9
Restore main's behaviour in the load/merge acceptance tests
denik Oct 27, 2026
10c3791
Round-trip the selected target through its typed form like main; drop…
denik Oct 27, 2026
72aceda
Trim the restored libs/dyn to what the load path needs; adapt unit te…
denik Oct 27, 2026
e070ec9
Keep libs/dyn unchanged in this change; the unused parts are removed …
denik Oct 27, 2026
33b36e8
Port main's workspace.sync_mode and refschema changes lost in the rep…
denik Oct 27, 2026
6ddad1e
Docs and yamlfmt: libs/dyn still loads the configuration
denik Oct 27, 2026
46dfd4c
Remove the mutator main deleted, the dead libs/dyn code, and update t…
denik Oct 27, 2026
5b0bf91
acc: the pause-status presets work with a whole schedule or trigger r…
denik Oct 27, 2026
1ce2689
acc: say precisely what the required-field check gets wrong for a ref…
denik Oct 28, 2026
5f8e961
acc: no Badness for the monitor schedule test; it prints no warnings …
denik Oct 28, 2026
f1a0070
Regenerate the walkers after the SDK update to v0.191.0 and the snaps…
denik Oct 28, 2026
4b31ad7
acc: use the minimal configs of the lower layer; refresh the schedule…
denik Oct 28, 2026
f8b9f62
acc: use the plain-field scripts of the lower layer
denik Oct 28, 2026
700429d
Give the libraries that a glob expands to the locations of the glob
denik Oct 28, 2026
89945a3
Drop the test of the deleted SetDefault; use main's reference tests
denik Oct 28, 2026
d399677
Skip required fields of a pure reference in the walker over side tables
denik Oct 29, 2026
c763c5c
Omit deployment metadata from generated jobs and pipelines (main's #7…
denik Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .agents/rules/auto-generated-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ globs:
- "internal/mocks/**/*.go"
- "bundle/direct/dresources/configs/*.generated.yml"
- "bundle/config/validate/*_walk.go"
- "bundle/config/walk/*_walk.go"
- "bundle/config/mutator/resourcemutator/defaults_walk.go"
- "bundle/config/resources_iterate.go"
- "bundle/schema/jsonschema.json"
- "python/databricks/bundles/version.py"
- "python/databricks/bundles/*/__init__.py"
Expand All @@ -34,6 +37,9 @@ paths:
- "internal/mocks/**/*.go"
- "bundle/direct/dresources/configs/*.generated.yml"
- "bundle/config/validate/*_walk.go"
- "bundle/config/walk/*_walk.go"
- "bundle/config/mutator/resourcemutator/defaults_walk.go"
- "bundle/config/resources_iterate.go"
- "bundle/schema/jsonschema.json"
- "python/databricks/bundles/version.py"
- "python/databricks/bundles/*/__init__.py"
Expand Down
4 changes: 2 additions & 2 deletions .agents/rules/style-guide-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ return fieldPaths

### Encoding

**RULE: When mutating an API response by round-tripping JSON, decode with `json.Decoder` + `UseNumber()`.** The naive `json.Marshal` → `map[string]any` → `Marshal` path corrupts any int64 larger than 2^53 (it degrades to a float64 mantissa — e.g. a real `spark_context_id`) and alphabetizes object keys. `libs/dyn/jsonloader` preserves key order but also lacks `UseNumber`, so it shares the int64 hazard.
**RULE: When mutating an API response by round-tripping JSON, decode with `json.Decoder` + `UseNumber()`.** The naive `json.Marshal` → `map[string]any` → `Marshal` path corrupts any int64 larger than 2^53 (it degrades to a float64 mantissa — e.g. a real `spark_context_id`) and alphabetizes object keys.

**RULE: Be careful with `encoding/csv` `Writer.UseCRLF = true`.** It rewrites both record terminators AND embedded newlines inside quoted fields to `\r\n`, so tests for quoted multiline fields must expect `\r\n`, not just the line endings between rows.

Expand Down Expand Up @@ -191,7 +191,7 @@ func NewService(deps ServiceDeps) *Service { ... }

### Configuration patterns

- Bundle config uses `dyn.Value` for dynamic typing
- Bundle config is loaded, included and target-merged as a `dyn.Value`, then converted once to typed structs (`bundle/config.Root`) at the end of the load phase; after that, mutators use the structs, and `libs/structs/structvar` carries `${...}` references and source locations
- Config loading supports includes, variable interpolation, and target overrides
- Schema generation is automated from Go struct tags

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/bump-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ allowed-tools: Read, Edit, Write, Bash, Glob, Grep, WebFetch, AskUserQuestion

The SDK version lives in `go.mod` (`github.com/databricks/databricks-sdk-go`) and the pinned spec SHA lives in `.codegen/_openapi_sha`.
These two move as a pair; everything else in this skill is regenerated from them or is fallout you fix by hand.
Do not hand-edit generated files (`.codegen/cli.json`, `cmd/workspace/*`, `cmd/account/*`, `bundle/schema/jsonschema.json`, `bundle/config/validate/*_walk.go`, `bundle/direct/dresources/configs/*.generated.yml`, `python/databricks/bundles/**`); regenerate them.
Do not hand-edit generated files (`.codegen/cli.json`, `cmd/workspace/*`, `cmd/account/*`, `bundle/schema/jsonschema.json`, `bundle/config/validate/*_walk.go`, `bundle/config/walk/*_walk.go`, `bundle/direct/dresources/configs/*.generated.yml`, `python/databricks/bundles/**`); regenerate them.

The Python tasks (`pydabs-*`, and the `pydabs-codegen` step inside `generate-check`) all run through `uv`. If one fails because `uv` is missing or because the host's `python3` is too old (e.g. 3.9), install `uv` (`curl -LsSf https://astral.sh/uv/install.sh | sh`) rather than touching the system Python: `uv run` provisions the interpreter each package pins (`>=3.10`, and `==3.13.*` under `python/codegen/`) and downloads it if needed. Do not chase the system Python version.
The acceptance goldens are the exception: they need CI's `uv` index, see step 4.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
acceptance/bundle/python/ \
go.mod \
go.sum \
libs/dyn/dynvar/testdata/reference_vectors.json \
libs/structs/structvar/testdata/reference_vectors.json \
python/ \
tools/task/ \
)
Expand Down
1 change: 1 addition & 0 deletions .nextchanges/bundles/7098-presence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `bundle validate` no longer treats a written zero value in a field that cannot record it (no `ForceSendFields`, e.g. `job_id: 0` in `run_job_task`) or an empty mapping (e.g. `presets: {}`) as set, and does not show the pipeline `development` deprecation warning for `development: true` under `mode: development`. ([#7098](https://github.com/databricks/cli/pull/7098))
1 change: 1 addition & 0 deletions .nextchanges/bundles/7098.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Speed up bundle commands on large bundles: configuration is kept as typed structs instead of being converted to and from a dynamic tree (`bundle validate` and `bundle plan` with 1000 jobs are about 10x faster and use about 3.5x less memory). ([#7098](https://github.com/databricks/cli/pull/7098))
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is the Databricks CLI, a command-line interface for interacting with Databr

**RULE: Keep each PR focused on one change.** If you notice an unrelated cleanup, bug fix, or refactor while making your primary change, leave it alone or put it in a separate PR. Reviewers consistently ask to split mixed PRs, especially when a dependency bump or schema diff rides along with a feature change.

**RULE: Before adding a new helper, search the codebase for an existing one.** Common homes: `libs/` (shared utilities), `libs/databrickscfg/` (config), `libs/git/`, `libs/filer/`, `libs/cmdio/` (CLI I/O, spinners, prompts), `libs/env/` (env vars), `libs/testserver/`, `libs/structpath/` and `libs/dyn/` (path / dynamic values), `acceptance/bin/` (acceptance test helpers), `internal/mocks/` (generated mocks). A function that duplicates an existing name and signature in the same package is a compile error waiting to happen; grep before you name.
**RULE: Before adding a new helper, search the codebase for an existing one.** Common homes: `libs/` (shared utilities), `libs/databrickscfg/` (config), `libs/git/`, `libs/filer/`, `libs/cmdio/` (CLI I/O, spinners, prompts), `libs/env/` (env vars), `libs/testserver/`, `libs/structs/structpath/` and `libs/structs/structvar/` (paths / typed config values), `acceptance/bin/` (acceptance test helpers), `internal/mocks/` (generated mocks). A function that duplicates an existing name and signature in the same package is a compile error waiting to happen; grep before you name.

# Development Commands

Expand Down Expand Up @@ -73,7 +73,8 @@ GIT_EDITOR=true GIT_SEQUENCE_EDITOR=true VISUAL=true GIT_PAGER=cat git rebase or
- `bundle/phases/` - High-level deployment phases

**libs/** - Shared libraries and utilities
- `libs/dyn/` - Dynamic configuration value manipulation
- `libs/dyn/` - Dynamic configuration value tree: loads `databricks.yml` and its includes and merges targets, before the configuration is converted to typed structs
- `libs/structs/structvar/` - Typed configuration values with references and locations
- `libs/filer/` - File system abstraction (local, DBFS, workspace)
- `libs/auth/` - Databricks authentication handling
- `libs/sync/` - File synchronization between local and remote
Expand Down
5 changes: 4 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1021,8 +1021,11 @@ tasks:
- "{{.EMBED_SOURCES}}"
generates:
- bundle/config/validate/*_walk.go
- bundle/config/walk/*_walk.go
- bundle/config/mutator/resourcemutator/defaults_walk.go
- bundle/config/resources_iterate.go
cmds:
- "sh -c 'go run ./bundle/internal/validation/. && gofmt -w -s ./bundle/config/validate/required_walk.go ./bundle/config/validate/enum_walk.go'"
- "go run ./bundle/internal/validation/."

generate-direct:
desc: Generate direct engine config (apitypes + resources)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@

>>> uv run [UV_ARGS] -q [CLI] bundle validate
Warning: The "development" property of pipelines is deprecated. Use "mode: development" in your databricks.yml instead. See https://docs.databricks.com/dev-tools/bundles/deployment-modes.
at resources.pipelines.with_development.development
in resources.py:7:1

Name: my_project
Target: dev
Workspace:
User: [USERNAME]
Path: /Workspace/Users/[USERNAME]/.bundle/my_project/dev

Found 1 warning
Validation OK!

>>> uv run [UV_ARGS] -q [CLI] bundle validate --output json
Warning: The "development" property of pipelines is deprecated. Use "mode: development" in your databricks.yml instead. See https://docs.databricks.com/dev-tools/bundles/deployment-modes.
at resources.pipelines.with_development.development
in resources.py:7:1

{
"with_development": true,
"without_development": true
Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/refschema/output/root.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__locations *dynloc.Locations INPUT
__locations *loctable.Locations INPUT
__locations.files []string INPUT
__locations.files[*] string INPUT
__locations.locations map[string][][]int INPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Error: cannot resolve bundle auth configuration: resolve: strict profile matchin
Name: strict-profile-match
Target: classic_other_workspace
Workspace:
Host: [DATABRICKS_URL]
Host: [DATABRICKS_URL]/?o=2222222222

Found 1 error

Expand Down
4 changes: 2 additions & 2 deletions acceptance/bundle/strict_profile_match/host/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Error: cannot resolve bundle auth configuration: resolve: strict profile matchin
Name: strict-profile-match
Target: classic_other_workspace
Workspace:
Host: [DATABRICKS_URL]
Host: [DATABRICKS_URL]/?o=2222222222

Found 1 error

Expand All @@ -48,7 +48,7 @@ Error: cannot resolve bundle auth configuration: resolve: strict profile matchin
Name: strict-profile-match
Target: custom_host_other_workspace
Workspace:
Host: [CUSTOM_HOST]
Host: [CUSTOM_HOST]/?o=2222222222

Found 1 error

Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/summary/modified_status/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ All files and directories at the following location will be deleted: /Workspace/
Destroy: 4 deleted

>>> [CLI] bundle summary -o json
{}
null
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
>>> [CLI] bundle validate
Warning: invalid value "INVALID" for enum field. Valid values are [CAN_MANAGE CAN_MANAGE_RUN CAN_VIEW IS_OWNER]
at resources.apps.app.resources[0].job.permission
in databricks.yml:13:25
in databricks.yml:17:25

Name: test-bundle
Target: default
Expand All @@ -15,7 +15,7 @@ Found 1 warning
>>> [CLI] bundle validate -o json
Warning: invalid value "INVALID" for enum field. Valid values are [CAN_MANAGE CAN_MANAGE_RUN CAN_VIEW IS_OWNER]
at resources.apps.app.resources[0].job.permission
in databricks.yml:13:25
in databricks.yml:17:25

[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A diagnostic on a field of a duplicated app resource entry points at the first entry when the duplicate's value is the same.
# A diagnostic on a field of a duplicated app resource entry points at the entry that is kept (the later one).
errcode trace $CLI bundle validate

# The entries are merged by name, the later one wins.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Includes after one that fails to merge do not report their diagnostics.
# Includes after one that fails to merge still report their diagnostics.
errcode trace $CLI bundle validate
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# resources: null is rejected.
# resources: null is accepted.
errcode trace $CLI bundle validate

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# A map value whose reference resolves to the wrong type is dropped, with a warning at its path.
# A map value whose reference resolves to the wrong type becomes an empty string, with a warning at its path.
trace $CLI bundle validate -o json | jq .resources.jobs.j.tags
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# A list element whose reference resolves to the wrong type is dropped, with a warning at its path.
# A list element whose reference resolves to the wrong type becomes an empty string, with a warning at its path.
trace $CLI bundle validate -o json | jq .resources.jobs.j.email_notifications
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
bundle:
name: test-bundle

variables:
bad:
type: complex
default:
x: 1

resources:
jobs:
j:
name: test
email_notifications:
on_failure: ["a@example.test", "${var.bad}", "b@example.test", "${var.bad}", "${var.bad}", "c@example.test"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cloud = false
EnvMatrix.DMS = ["", "true"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

>>> [CLI] bundle validate -o json
Warning: expected string, found map
at resources.jobs.j.email_notifications.on_failure[1]
in databricks.yml:15:40

Warning: expected string, found map
at resources.jobs.j.email_notifications.on_failure[3]
in databricks.yml:15:72

Warning: expected string, found map
at resources.jobs.j.email_notifications.on_failure[4]
in databricks.yml:15:86

{
"on_failure": [
"a@example.test",
"b@example.test",
"c@example.test"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Several list elements whose reference resolves to the wrong type are dropped, the others keep their order.
trace $CLI bundle validate -o json | jq .resources.jobs.j.email_notifications
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
>>> [CLI] bundle validate -o json
{
"default": {
"actual_branch": "",
"branch": "",
"bundle_root_path": ".",
"commit": "",
"origin_url": ""
"bundle_root_path": "."
},
"type": "complex",
"value": {
"actual_branch": "",
"branch": "",
"bundle_root_path": ".",
"commit": "",
"origin_url": ""
"bundle_root_path": "."
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# A reference to a struct that is not set in the configuration (here outside a git repository)
# resolves to the struct with its fields filled in, as empty values.
# resolves to the fields that are set; unset fields are omitted.
trace $CLI bundle validate -o json | jq .variables.git_info
2 changes: 1 addition & 1 deletion acceptance/bundle/validate/required/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resources:
jobs:
my_job_1:
tasks:
# job_id being 0 should not trigger a warning.
# job_id 0 is not set either: RunJobTask has no ForceSendFields to record it.
- task_key: "task_key1"
run_job_task:
job_id: 0
Expand Down
6 changes: 5 additions & 1 deletion acceptance/bundle/validate/required/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Warning: required field "catalog_name" is not set
at resources.volumes.my_volume
in databricks.yml:35:7

Warning: required field "job_id" is not set
at resources.jobs.my_job_1.tasks[0].run_job_task
in databricks.yml:25:13

Warning: required field "job_id" is not set
at resources.jobs.my_job_1.tasks[1].run_job_task
in databricks.yml:29:24
Expand All @@ -26,4 +30,4 @@ Workspace:
User: [USERNAME]
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Found 5 warnings
Found 6 warnings
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# A scalar targets section is an error.
# A scalar targets section is reported with a warning at its location.
errcode trace $CLI bundle validate

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

>>> [CLI] bundle validate
Warn: unable to convert typed configuration to dynamic configuration: cannot convert struct field to dynamic type "time": src=time.Date(2020, time.January, 2, 0, 0, 0, 0, time.UTC) ref=time.Date(2020, time.January, 2, 0, 0, 0, 0, time.UTC)
Error: exit error: cannot convert struct field to dynamic type "time": src=time.Date(2020, time.January, 2, 0, 0, 0, 0, time.UTC) ref=time.Date(2020, time.January, 2, 0, 0, 0, 0, time.UTC)

Name: test-bundle
Target: default
Workspace:
User: [USERNAME]
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Found 1 error

Exit code: 1
Validation OK!

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
>>> [CLI] bundle validate
Warning: unknown field: misspelled_field
at resources.jobs.j
in databricks.yml:9:7

Name: test-bundle
Target: default
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Badness = "The unknown field warning has no location; it should point at the key in the variable default (databricks.yml:9:7)."

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ Error: duplicate YAML merge key ('<<') is not allowed; to merge multiple maps, u
Found 1 error

Exit code: 1

>>> [CLI] bundle validate -t dev -o json
Error: duplicate YAML merge key ('<<') is not allowed; to merge multiple maps, use a sequence: '<<: [*anchor1, *anchor2]'
in databricks.yml:18:7


Exit code: 1
null
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Two '<<' keys in target variables are an error.
errcode trace $CLI bundle validate -t dev
# What was merged into the variable:
errcode trace $CLI bundle validate -t dev -o json | jq .variables.x

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ Error: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databr
Found 1 error

Exit code: 1

>>> [CLI] bundle validate -t dev -o json
Error: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databricks.yml:15:11): map merge requires map or sequence of maps as the value


Exit code: 1
null
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# A scalar among the maps merged with '<<: [...]' is an error.
errcode trace $CLI bundle validate -t dev
# What was merged into the variable:
errcode trace $CLI bundle validate -t dev -o json | jq .variables.x
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# A value replaced by a later duplicate key is still loaded, so its invalid (integer) key is rejected.
# An invalid (integer) key inside a value that a later duplicate key replaces.
errcode trace $CLI bundle validate
Loading
Loading