[overlay] improve overlay mismatch error message by specifying left/right side context
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
some error message improvements to indicate left vs right nodes
```
Document on line demo.yml:10 [matched demo.yml:1]
Map item key 'clients' on line demo.yml:11 [matched demo.yml:2]
Map item key 'client1' on line demo.yml:12 [did not match]
Expected number of matched left map items to be 1, but was 0
```
vs
```
left=demo.yml right=overlay.yml
left=:1 right=:10 [matched] Document
left=:2 right=:11 [matched] Map item key 'clients'
left=? right=:12 [error] Map item key 'client1'
Expected number of matched left map items to be 1, but was 0
```
vs
```
left=demo.yml:1 right=demo.yml:10 [matched] Document
left=demo.yml:2 right=demo.yml:11 [matched] Map item key 'clients'
left=? right=demo.yml:12 [error] Map item key 'client1'
Expected number of matched left map items to be 1, but was 0
```
originated from https://github.com/k14s/ytt/issues/94
/cc @jtigger
Contributor guide
Assessment
This issue has not been assessed yet.