(feature) Allow more variations for a flag #180
Labels
breaking change
change
This is a change in the code that should not affect the users
p1
High priority
Milestone
For now, go-feature-flag allows only to have 3 variations (
true
,false
,default
).While this is fine for most cases it can be a blocker if you want to have more than that, that's why it could be great to allows to as much variations as we want.
The only way to make this possible is to introduce a new format to configure your flag.
⚠️ This feature will be a breaking change and all configuration will have to be re-written.
A proposal for the new format (here in yaml) can be:
variations
: all the possible variation and the associate value. It can still be in all available formats (int
,float64
,json
,json array
,string
,bool
).targeting
: all the existing rules for this flag and associate variation if the rule match.defaultRule
: if none of the rule in the targeting match for the user, we are applying the default rule.rollout
: how we rollout the flag (experimetation or scheduled)targeting
anddefaultRule
are using the same struct under the hood and it should looks like:Before releasing anything
We should avoid the maximum to have a broken release so before releasing we want to have:
The text was updated successfully, but these errors were encountered: