CUE "conflicting values" error in CI
CUE unifies every constraint on a field into one value. When two constraints cannot both hold (a string where an int is required, or two different concrete values), unification fails with "conflicting values" and shows both sides.
What this error means
cue vet or cue export fails with "conflicting values X and Y" (or "conflicting values \"a\" and int") plus the file:line of each constraint.
port: conflicting values "8080" and int (mismatched types string and int):
./schema.cue:3:9
./values.cue:2:7Common causes
A value that violates its declared type
A field constrained to int is given a string like "8080", so the two constraints conflict.
Two files pin the same field to different concrete values
Unifying a base and an override that each set the field to a different literal has no consistent result.
How to fix it
Make the value satisfy every constraint
- Read both file:line locations CUE prints for the conflict.
- Fix the value to match the declared type, or reconcile the two literals.
- Re-run
cue vetto confirm unification succeeds.
# wrong: port declared int but set to a string
port: int
port: "8080"
# right
port: int
port: 8080Loosen an over-constrained field
If both values are legitimately possible, use a disjunction or a default instead of two hard pins.
port: int | *8080How to prevent it
- Run
cue vetin CI so conflicts surface before export. - Keep types and defaults in one schema file, overrides separate.
- Use disjunctions/defaults instead of pinning a field twice.