Skip to content

Accept inline YAML merge mappings in bundles - #7269

Merged
lennartkats-db merged 2 commits into
mainfrom
codex/dabs-yaml-inline-merge-20261030
Nov 2, 2026
Merged

lennartkats-db merged 2 commits into
mainfrom
codex/dabs-yaml-inline-merge-20261030

Conversation

@lennartkats-db

@lennartkats-db lennartkats-db commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Bundles using an inline YAML merge mapping now pass validation. The merged acceptance fixture records <<: {x: overridden} as valid input that bundle validate previously rejected with map merge requires map or sequence of maps as the value. PR #7085 introduced this fixture to pin that behavior.

The YAML loader now accepts a mapping node as one merge source. The updated acceptance case checks bundle validate -t dev without --strict and the resolved JSON value of variables.x; a focused unit test checks that an explicit key takes precedence while another merged key remains.

Local verification

The five-file diff was checked on codex/dabs-yaml-inline-merge-20261030 at its recorded upstream base:

  • TestYAMLInlineMapMerge passed.
  • The focused inline-merge acceptance case passed without --strict with DMS= and DMS=true. Both modes reported Validation OK! and JSON default and value of overridden.
  • git diff --check passed.

These are local checks; this body makes no CI claim.

Candidate assignee

Denis Bilenko (denik) authored PR #7085, which added the inline-merge fixture.

@lennartkats-db
lennartkats-db requested review from a team as code owners October 30, 2026 16:49
@github-actions github-actions Bot added the DABs DABs related issues label Oct 30, 2026
@lennartkats-db
lennartkats-db removed the request for review from anton-107 October 30, 2026 16:51
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 2cc1143e6 | Workflow run

Regression test report

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

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

test branch main (3aa5c96) latest (v1.23.0)
TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS= ✅ ❌ ❌
TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS=true ✅ ❌ ❌
TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS=: branch ✅ | main (3aa5c96) ❌ | latest (v1.23.0) ❌

main (3aa5c96):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -t dev\nName: test-bundle\nTarget: dev\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev\n\nValidation OK!\n\n>>> [CLI] bundle validate -t dev -o json\n{\n  \"default\": \"overridden\",\n  \"value\": \"overridden\"\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -t dev\nError: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databricks.yml:11:11): map merge requires map or sequence of maps as the value\n\n\nFound 1 error\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,15 +2,8 @@
        	            	 >>> [CLI] bundle validate -t dev
        	            	-Name: test-bundle
        	            	-Target: dev
        	            	-Workspace:
        	            	-  User: [USERNAME]
        	            	-  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev
        	            	+Error: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databricks.yml:11:11): map merge requires map or sequence of maps as the value
        	            	 
        	            	-Validation OK!
        	            	 
        	            	->>> [CLI] bundle validate -t dev -o json
        	            	-{
        	            	-  "default": "overridden",
        	            	-  "value": "overridden"
        	            	-}
        	            	+Found 1 error
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS=
        	Messages:   	bundle/validate/yaml_anchors/inline_merge_mapping/output.txt vs /tmp/TestAcceptbundlevalidateyaml_anchorsinline_merge_mappingDMS1315905424/002/output.txt

latest (v1.23.0): same output as main (3aa5c96)

TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS=true: branch ✅ | main (3aa5c96) ❌ | latest (v1.23.0) ❌

main (3aa5c96):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -t dev\nName: test-bundle\nTarget: dev\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev\n\nValidation OK!\n\n>>> [CLI] bundle validate -t dev -o json\n{\n  \"default\": \"overridden\",\n  \"value\": \"overridden\"\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -t dev\nError: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databricks.yml:11:11): map merge requires map or sequence of maps as the value\n\n\nFound 1 error\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,15 +2,8 @@
        	            	 >>> [CLI] bundle validate -t dev
        	            	-Name: test-bundle
        	            	-Target: dev
        	            	-Workspace:
        	            	-  User: [USERNAME]
        	            	-  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev
        	            	+Error: failed to load [TEST_TMP_DIR]/databricks.yml: yaml ([TEST_TMP_DIR]/databricks.yml:11:11): map merge requires map or sequence of maps as the value
        	            	 
        	            	-Validation OK!
        	            	 
        	            	->>> [CLI] bundle validate -t dev -o json
        	            	-{
        	            	-  "default": "overridden",
        	            	-  "value": "overridden"
        	            	-}
        	            	+Found 1 error
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/validate/yaml_anchors/inline_merge_mapping/DMS=true
        	Messages:   	bundle/validate/yaml_anchors/inline_merge_mapping/output.txt vs /tmp/TestAcceptbundlevalidateyaml_anchorsinline_merge_mappingDMS1598494375/002/output.txt
FAIL

latest (v1.23.0): same output as main (3aa5c96)

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2cc1143

Run: 41464318070

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 16 3:25
✅​ aws-windows-latest-4core-16gb 283 14 3:36
✅​ azure linux-2core-8gb 280 16 3:22
✅​ azure-windows-latest-4core-16gb 282 14 3:38
✅​ gcp linux-2core-8gb 281 16 3:32
✅​ gcp-windows-latest-4core-16gb 283 14 3:42
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:36 gcp-windows-latest-4core-16gb TestAccept
3:32 azure-windows-latest-4core-16gb TestAccept
3:30 aws-windows-latest-4core-16gb TestAccept

@lennartkats-db lennartkats-db added the software-factory PR produced by the software factories task label Oct 30, 2026
@lennartkats-db lennartkats-db changed the title [draft] Accept inline YAML merge mappings in bundles [draft] [trivial] Accept inline YAML merge mappings in bundles Oct 30, 2026
@lennartkats-db lennartkats-db changed the title [draft] [trivial] Accept inline YAML merge mappings in bundles Accept inline YAML merge mappings in bundles Oct 31, 2026
@lennartkats-db
lennartkats-db requested a review from denik October 31, 2026 11:40
@denik

denik commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Bundles using an inline YAML merge mapping now pass strict validation

Was the issue strict mode related? The original test only did --strict but it seems like it would fail without strict as well?

@@ -1,2 +1,3 @@
# An inline mapping as the value of '<<' in target variables.
errcode trace $CLI bundle validate
trace $CLI bundle validate --strict -t dev

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@denik I tested the case without --strict rather than relying on the original fixture. After removing the flag from both acceptance commands, bundle validate -t dev reported Validation OK! in both DMS= and DMS=true, and the JSON command returned variables.x with both default and value set to overridden. The focused acceptance test passed with the regenerated output in commit 2cc1143e6.

The fix is in YAML merge loading and does not depend on strict mode. My earlier reply inferred that from the old failure but did not verify the successful path without the flag.

@lennartkats-db
lennartkats-db added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit f00a15a Nov 2, 2026
27 checks passed
@lennartkats-db
lennartkats-db deleted the codex/dabs-yaml-inline-merge-20261030 branch November 2, 2026 15:11
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: f00a15a

Run: 41469180111

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 2 2 1500 1226 240:47
❌​ aws-windows-latest-4core-16gb 1 3 1425 1251 267:28
✅​ azure linux-2core-8gb 1351 1278 219:50
🔄​ azure-windows-latest-4core-16gb 3 1273 1303 215:50
🔄​ gcp linux-2core-8gb 4 1334 1283 234:27
✅​ gcp-windows-latest-4core-16gb 1263 1308 244:13
12 interesting tests: 10 flaky, 2 FAIL
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure-windows-latest-4core-16gb gcp linux-2core-8gb
❌​ TestAccept ❌​F 🔄​f 🔄​f ✅​p
🔄​ TestAccept/bundle/deploy/immutable/select ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/deploy/immutable/select/DMS= ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/dms/state-features ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/dms/state-features/DMS=true ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/invariant/delete_idempotent ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=job_with_depends_on.yml.tmpl/READPLAN= ✅​p ✅​p ✅​p 🔄​f
❌​ TestAccept/bundle/resources/postgres_projects/factcheck/update_mask_spec ❌​F ❌​F 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/postgres_projects/remove_history_retention 🔄​f ✅​p 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/postgres_projects/remove_history_retention/DMS= 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate ✅​p 🔄​f 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS=true ✅​p 🔄​f
Top 50 slowest tests (at least 2 minutes):
duration env testname
14:46 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
13:16 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
12:32 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
12:19 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
11:48 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:51 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
10:15 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:00 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
9:50 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:44 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:27 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:25 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
9:20 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
9:18 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=
9:15 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:09 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:51 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:50 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:42 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:31 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:30 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:04 azure linux-2core-8gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=
7:57 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:41 azure linux-2core-8gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
7:38 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:38 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:34 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:29 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/simple/DMS=
7:26 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
7:25 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:22 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
7:19 gcp-windows-latest-4core-16gb TestAccept
7:14 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
7:13 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
7:08 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:07 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=
7:00 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:59 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/simple/DMS=true
6:58 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:55 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:54 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=
6:48 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:48 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:47 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
6:40 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:27 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:27 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
6:14 gcp linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
6:03 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=
5:53 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=

@lennartkats-db lennartkats-db added software-factory PR produced by the software factories task and removed software-factory PR produced by the software factories task labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues software-factory PR produced by the software factories task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants