Skip to content

acc: record how includes and target overrides merge, and how nulls are handled - #7259

Draft
denik wants to merge 3 commits into
mainfrom
denik/investigate-nulls
Draft

denik wants to merge 3 commits into
mainfrom
denik/investigate-nulls

Conversation

@denik

@denik denik commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Changes

New bundle validate acceptance tests that record how configuration from included files and from the selected target is merged, and what null values do. No code changes.

validate/include_vs_target applies the same overrides once from an included file and once from a target and diffs the results. In both, maps merge key by key, the later scalar wins and lists are concatenated. They differ in:

  • run_as: an include merges into the root identity (two identities, an error: includes/run_as_merged); a target replaces it.
  • complex variable default: an include deep-merges it, lists included; a target replaces it.
  • experimental, scripts (also python, include: targets/unknown_sections): merged from an include; ignored as unknown fields in a target.

Also recorded:

  • includes: the same resource in two files is an error but still merged; a null foo: counts as a definition; the same resource under targets.<t>.resources in several files merges silently; later files win, glob matches are sorted.
  • targets: job lists (email_notifications.on_failure, task libraries) are concatenated; tasks merge by task_key; target cluster_id wins over bundle.cluster_id; a target split across files is merged first, then applied over all files; ""/0/false override, []/{} do not clear.
  • nulls never override, in includes or targets, including the fields a target replaces (mode, cluster_id, run_as, variable default/lookup). The only null that reaches the result is inside a complex variable default set by a target, because the target replaces the whole default.

Badness: run/ambiguous_key_from_target. The unique-key check runs before target overrides, so a target can add pipelines.foo next to jobs.foo: validate, deploy and summary accept it, and bundle run foo fails with "multiple resources with key".

Why

These semantics had no acceptance coverage, so a change to the merge code could alter them silently. Same series as #7085 and #7130.

Tests

New tests only; goldens recorded on main.

This pull request and its description were written by Isaac.

…e handled

Acceptance tests that pin today's merge semantics of included files and
target overrides, section by section, and show that null values never
override a value from databricks.yml or another file.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the DABs DABs related issues label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 36d4c3a89 | Workflow run

Regression test report

Selected 16 changed tests (limit=20, 0 not selected)

32 tests: regression=0 unreleased=0 coverage=32 failing=0

test branch main (e9e2d63) latest (v1.23.0)
TestAccept/bundle/run/ambiguous_key_from_target/DMS= ✅ ✅ ✅
TestAccept/bundle/run/ambiguous_key_from_target/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/include_vs_target/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/include_vs_target/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/includes/order/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/includes/order/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/includes/run_as_merged/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/includes/run_as_merged/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/includes/same_resource_in_target_of_two_files/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/includes/same_resource_in_target_of_two_files/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/includes/same_resource_in_two_files/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/includes/same_resource_in_two_files/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/nulls/complex_variable_default/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/nulls/complex_variable_default/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/nulls/include_does_not_override/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/nulls/include_does_not_override/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/nulls/include_resource_is_a_definition/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/nulls/include_resource_is_a_definition/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/nulls/target_does_not_override/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/nulls/target_does_not_override/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/nulls/target_resource_does_not_override/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/nulls/target_resource_does_not_override/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/targets/empty_values/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/targets/empty_values/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/targets/job_fields_merge/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/targets/job_fields_merge/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/targets/split_across_files/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/targets/split_across_files/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/targets/top_level_fields/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/targets/top_level_fields/DMS=true ✅ ✅ ✅
TestAccept/bundle/validate/targets/unknown_sections/DMS= ✅ ✅ ✅
TestAccept/bundle/validate/targets/unknown_sections/DMS=true ✅ ✅ ✅

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 36d4c3a

Run: 41070790794

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 31 5:16
✅​ aws-windows-latest-4core-16gb 283 29 4:02
✅​ azure linux-2core-8gb 280 31 5:15
🔄​ azure-windows-latest-4core-16gb 2 280 29 4:45
🔄​ gcp linux-2core-8gb 2 279 31 5:44
✅​ gcp-windows-latest-4core-16gb 283 29 3:28
Test Name azure-windows-latest-4core-16gb gcp linux-2core-8gb
🔄​ TestFsCpFileToFile 🔄​f ✅​p
🔄​ TestFsCpFileToFile/uc-volumes_to_local 🔄​f ✅​p
🔄​ TestFsCpSourceIsDirectoryButTargetIsFile ✅​p 🔄​f
🔄​ TestFsCpSourceIsDirectoryButTargetIsFile/uc-volumes_to_dbfs ✅​p 🔄​f
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:29 azure-windows-latest-4core-16gb TestAccept
3:57 aws-windows-latest-4core-16gb TestAccept
3:43 gcp linux-2core-8gb TestAccept
3:42 azure linux-2core-8gb TestAccept
3:40 aws linux-2core-8gb TestAccept
3:24 gcp-windows-latest-4core-16gb TestAccept

…ource key

Moves validate/targets/resource_key_collision to run/ambiguous_key_from_target.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants