Is it possible to implement multiple values for a single property in .features.yaml? #2751
-
Currently using v1.27.1. I am using a Git backend and I have created a flag with a segment I have looked through the docs but I have not been able to find anything that supports this type of feature that allows checking if a property value is one of a list of provided values. Could someone explain if this is possible, and if so, how to configure the constraint to do it? I saw that Discussion 584 asks a similar question but it doesn't seem to discuss the resolution method or if this feature is possible. namespace: lz-nola-prod
flags:
- key: my-flag
name: my-flag
enabled: true
variants:
- key: enabled
name: Enabled
- key: disabled
name: Disabled
rules:
- segment: dev-group
distributions:
- variant: enabled
rollout: 100
segments:
- key: dev-group
name: dev-group segment
constraints:
- type: STRING_COMPARISON_TYPE
property: group-type
operator: eq
value: new
- type: STRING_COMPARISON_TYPE
property: env
operator: isoneof
value: ["dev", "qual"]
match_type: ALL_MATCH_TYPE
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @shivomPatel ! thanks for the question. we definitely need to do a better job of documenting constraint types/operators. Will create a documentation issue for that To answer your question, yes it is possible! Here's what the section of the YAML would look like: segments:
- key: dev-group
name: dev-group
constraints:
- type: STRING_COMPARISON_TYPE
property: env
operator: isoneof
value: '["dev","qual"]'
match_type: ALL_MATCH_TYPE So basically your example was correct, you might just need to enclose the JSON array in Here's what the accompanying config would look like in the UI: One thing we could also add that we have talked about before is a |
Beta Was this translation helpful? Give feedback.
Hey @shivomPatel ! thanks for the question. we definitely need to do a better job of documenting constraint types/operators. Will create a documentation issue for that
To answer your question, yes it is possible!
Here's what the section of the YAML would look like:
So basically your example was correct, you might just need to enclose the JSON array in
' '
.Here's what the accompanying config would look like in the UI:
One thing we could also add that we have talked about before is a
copy as YAML
orex…