Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
b67cdc0
structpath: add NewPattern with AnyKey/AnyIndex wildcards
denik Oct 15, 2026
4cb2f90
bundle: delete libs/dyn; configuration is typed structs with structva…
denik Oct 7, 2026
01127a1
structvar: map YAML locations in the YAML source; drop mappedSource
denik Oct 7, 2026
2480f37
Use NewStringKeysSlice for single key paths
denik Oct 7, 2026
123446a
Build literal diagnostic paths with NewStringKeysSlice
denik Oct 7, 2026
361b76a
Restack fixes: structvar grammar for structpath's PureReferenceToPath…
denik Oct 7, 2026
85bbb69
Restore import block after restack
denik Oct 7, 2026
fd2a23b
Use structpath.NewPath for key/index paths
denik Oct 7, 2026
a343585
Build the target preset path in one NewPath call
denik Oct 8, 2026
ef643a2
GetLocationsOf on the location tree
denik Oct 8, 2026
8a7f303
Minimal import edits; drop unused diag import
denik Oct 8, 2026
f596ce6
structvar: test the YAML decoder with the yamlloader fixtures
denik Oct 9, 2026
7a4ac04
structvar: add the YAML test helpers
denik Oct 9, 2026
0cdb9a6
Port the job environment_variables files pattern (#6985) to structpath
denik Oct 9, 2026
423212f
Fix codex review findings
denik Oct 9, 2026
36671ab
Port the job environments project_environment pattern (#6983) to stru…
denik Oct 12, 2026
e7dd749
Fix regressions recorded by the config edge-case tests
denik Oct 14, 2026
e9a491a
Drop the embedded JobSettings literal flagged by embedlit
denik Oct 15, 2026
813d53f
Keep main's path-node location lookups; build app permission paths fr…
denik Oct 15, 2026
66aa94d
config: Nearest/Exact location lookups by path node; build paths from…
denik Oct 15, 2026
5fade97
structvar: don't allocate per struct field when traversing views
denik Oct 16, 2026
9198efe
structvar: traverse views without closures, map lookups or rebuilding…
denik Oct 16, 2026
c458ec3
bundletest: per-component benchmarks that also run on the dyn impleme…
denik Oct 17, 2026
01eaeb2
validate: generated typed walkers for required and enum fields
denik Oct 17, 2026
072e1ff
validate: required fields written in the source are set, even if zero
denik Oct 18, 2026
0df83e6
structvar: compare io.EOF with errors.Is
denik Oct 18, 2026
df02221
walk: shared node type for generated configuration walkers
denik Oct 18, 2026
a2c2a73
Changelog fragment for #7098
denik Oct 18, 2026
608232b
paths: typed visitors instead of pattern traversal
denik Oct 18, 2026
8ababa1
walk: generated string walker for references
denik Oct 18, 2026
336fe96
paths: visit explicitly written empty path values
denik Oct 18, 2026
027b30e
ApplyBundlePermissions: typed access to resource permissions
denik Oct 18, 2026
0603307
Fix review findings: presence rules of the typed walkers
denik Oct 18, 2026
a4194ea
config: generated iterators over all resources, permissions and grants
denik Oct 18, 2026
4cbb60e
config: keep main's GetLocationOf names; GetLocationOfExact for exact…
denik Oct 18, 2026
f86d979
Iterate resources, permissions, grants and states with the generated …
denik Oct 18, 2026
0b2087a
Typed access in single-type and fixed-field mutators
denik Oct 18, 2026
bf4ced6
Typed library iterators for library expansion, upload and duplicate c…
denik Oct 18, 2026
59017a0
Typed defaults and single node cluster validation; walk helpers shared
denik Oct 18, 2026
88d2a55
PopulateLocations reads the locations tree and the typed resources
denik Oct 18, 2026
85d304d
python: resource keys and the experimental.python copy from typed config
denik Oct 18, 2026
2dfc67f
Fix lint: unused required helpers, perfsprint, gofmt, dupword
denik Oct 18, 2026
153960a
ResolveVariableReferences collects references with the generated stri…
denik Oct 18, 2026
89c4603
ConfigureClusterPolicyDefinition: one helper called per field
denik Oct 18, 2026
3ae5c08
Typed access for the remaining reads of known fields
denik Oct 18, 2026
6f7d779
Fix review findings: python copy refs, grants iterator, built paths
denik Oct 18, 2026
3265cdf
Presence comes from ForceSendFields only, never from locations
denik Oct 18, 2026
33b943a
Presence follow-ups: FSF for strings, refs below structs, review fixes
denik Oct 18, 2026
2d63ded
structvar: decode YAML mappings without an index map and key location…
denik Oct 18, 2026
1ef55b2
References under removed values are not returned; libraries: null errors
denik Oct 18, 2026
b0dbe50
References: reachability by the view's presence rules
denik Oct 18, 2026
56259ee
References need the view to show them; Set adds no location marker
denik Oct 18, 2026
01a61d9
Strings walk stops at pure references; clean the default file path
denik Oct 18, 2026
481f26f
Strings walk: stop at a referenced struct node; scoped reference trees
denik Oct 19, 2026
8c1e8bb
paths: visit takes named arguments
denik Oct 19, 2026
35f3b48
Restore GetLocation/GetLocations (path string) and their callers
denik Oct 19, 2026
6ce7bba
paths: pass the path as a value, not a closure
denik Oct 19, 2026
72c618c
Update the validate edge-case tests for the typed configuration
denik Oct 19, 2026
68be572
Presets set by an include now clear base values: drop the Badness
denik Oct 20, 2026
4120246
Reconcile with main after the rebase
denik Oct 20, 2026
73e9e95
Regenerate the strings walker for ForceSendFields on Presets, Lifecyc…
denik Oct 20, 2026
ffc01d3
Drop a slice element or map entry whose resolved reference has the wr…
denik Oct 20, 2026
120d83c
Comment that clients is required and print the validated workload_type
denik Oct 20, 2026
c0d087f
acc: say what each test checks and print the relevant JSON; record th…
denik Oct 20, 2026
c1a15fe
Build on the lower stack layers: typed mutator versions, tests and ge…
denik Oct 21, 2026
64ad4e2
acc: take the lower layer's test fixtures and regenerate their goldens
denik Oct 21, 2026
48a547e
Normalize the host URL on a copy so the configuration keeps the host …
denik Oct 22, 2026
ace7e1f
Skip empty map keys in the generated walkers of the typed configuration
denik Oct 22, 2026
2db47b1
Keep an explicit null added by a merge set, as when it is decoded
denik Oct 22, 2026
cbee085
Port the undeployed-reference check of the terraform migration to str…
denik Oct 22, 2026
057fdf1
Port main's per-resource-type Python telemetry and lifecycle.depends_…
denik Oct 27, 2026
67dcd41
Use the renamed whole-map test directory of the lower layer
denik Oct 27, 2026
61c6120
Regenerate the strings walker for the immutable folder snapshot types
denik Oct 27, 2026
3ec5b1e
Hybrid spike: load, include and target merge in dyn, convert once to …
denik Oct 27, 2026
a776697
Restore main's behaviour in the load/merge acceptance tests
denik Oct 27, 2026
7d4e25d
Round-trip the selected target through its typed form like main; drop…
denik Oct 27, 2026
2557505
Trim the restored libs/dyn to what the load path needs; adapt unit te…
denik Oct 27, 2026
4a70a34
Keep libs/dyn unchanged in this change; the unused parts are removed …
denik Oct 27, 2026
0fe7e89
Port main's workspace.sync_mode and refschema changes lost in the rep…
denik Oct 27, 2026
871c2b0
Docs and yamlfmt: libs/dyn still loads the configuration
denik Oct 27, 2026
268de4a
Remove the mutator main deleted, the dead libs/dyn code, and update t…
denik Oct 27, 2026
91b74e0
acc: the pause-status presets work with a whole schedule or trigger r…
denik Oct 27, 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,11 +1,17 @@

>>> musterr [CLI] bundle validate
Error: expected a map to index "pause_status", found string
>>> [CLI] bundle validate
Warning: required field "quartz_cron_expression" is not set
at resources.jobs.viaref.schedule
in databricks.yml:16:17

Warning: required field "timezone_id" is not set
at resources.jobs.viaref.schedule
in databricks.yml:16:17

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

Found 1 error
Found 2 warnings
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# trigger_pause_status needs to set pause_status inside the schedule, but the schedule of viaref is a reference to the whole
# schedule of another job and is still unresolved at that point.
trace musterr $CLI bundle validate
trace $CLI bundle validate
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Badness = "trigger_pause_status fails with a confusing error when the schedule is a reference to the whole schedule of another job."
Badness = "Required-field warnings are reported for a schedule that is a reference to a complete schedule."
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

>>> musterr [CLI] bundle validate
Error: expected a map to index "pause_status", found string

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

Found 1 error
Validation OK!
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Same as with a schedule: pause_status cannot be set inside a trigger that is a reference to the whole trigger of another job.
trace musterr $CLI bundle validate
trace $CLI bundle validate

This file was deleted.

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.

Loading
Loading