Replies: 1 comment
-
Hey @vassilvk 👋 So I was confused by this as well, and I went digging :-) I've raised #2912 to flag the behaviour as a bug. I've phrased the issue in terms of the (seemingly) superfluous and confusing conflicting value flagged by the disjunction, so hopefully the new evaluator that's being developed can prefer the form of the error message that would be useful here. However, given that it's also an ordering-related issue, I'm not sure what fix might ultimately be proposed, and if it would make the output less confusing. I hope it will, of course! I'm not sure if you can affect the ordering sufficiently, in your more complete example, to avoid the confusing, conflicting value. I wasn't able to make that work, here, but maybe you'll have better luck since you control the wider shape of your CUE and your data. |
Beta Was this translation helpful? Give feedback.
-
Consider the following:
schema.cue
:values.yaml
:Here's the goal:
deployment_meta.container_image_platforms
should be one of["linux/arm64", "linux/amd64", "windows/amd64", "windows/arm64"]
.workload.deployment_platforms
should match one of the values indeployment_meta.container_image_platforms
.The above YAML file contains an intentional validation issue to demonstrate the problem.
List
workload.deployment_platforms
containswindows/amd64
which is not on the list of items indeployment_meta.container_image_platforms
.Running
vet values.yaml schema.cue
generates the following:I'm not sure I understand where the third message (about
windows/arm64
) is coming from, aswindows/arm64
is not in thedeployment_meta.container_image_platforms
list.Beta Was this translation helpful? Give feedback.
All reactions