Repository navigation
Commit f00a15a
authored
Accept inline YAML merge mappings in bundles (#7269)
**Bundles using an inline YAML merge mapping now pass validation.** The
[merged acceptance
fixture](https://github.com/databricks/cli/blob/a7e611477d067181ea538d3d8e1bd44ec1d9dfb5/acceptance/bundle/validate/yaml_anchors/inline_merge_mapping/test.toml)
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](#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](a7e6114):
- `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](#7085), which added the
inline-merge fixture.1 parent 3e13357 commit f00a15a
5 files changed
Lines changed: 26 additions & 10 deletions
File tree
- acceptance/bundle/validate/yaml_anchors/inline_merge_mapping
- libs/dyn/yamlloader
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments