You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YAML is ok, but I'm wondering if it makes sense to support other formats for defining flag state. These other formats may allow for us to do more concrete validation of data, or support things such as references and functions
Ideal Solution
One of the first formats I've thought we could support is HCL from Hashicorp.
I've started working on a proof of concept parser that would allow us to define flag state in HCL and then turn that into native objects that Flipt can work with (ie for import/export or serving evaluation if using a declarative backend).
Heres what it might look like:
namespace"example" {
name ="Example"
description ="An example namespace"
}
flag"feature" {
namespace = namespace.example
name ="feature"
type ="variant"
enabled =true
description ="A feature flag"
variants = [
{
key ="enabled"
name ="enabled"
description ="The feature is enabled"
},
{
key ="disabled"
name ="disabled"
description ="The feature is disabled"
}
]
rules = {
{
segment = segment.example
variant ="enabled"
},
{
segment = segment.example
distributions = {
{
rollout =50
variant ="enabled"
},
{
rollout =50
variant ="disabled"
}
}
}
}
}
segment"example" {
namespace = namespace.example
name ="example"
description ="An example segment"
match_type ="all"
constraints = {
{
type ="string"
property ="email"
operator ="contains"
value = ["@example.com"]
}
}
}
Before I go too far, I wanted to open this up for feedback to see:
If anyone would find this useful/interesting to support other formats for flag state in Flipt
If HCL is the 'right' choice, as there are other options available as well, such as PKL from Apple
Search
I searched for other open and closed issues before opening this
Problem
We currently support declarative flag state in YAML format: https://www.flipt.io/docs/configuration/storage#defining-flag-state
YAML is ok, but I'm wondering if it makes sense to support other formats for defining flag state. These other formats may allow for us to do more concrete validation of data, or support things such as references and functions
Ideal Solution
One of the first formats I've thought we could support is HCL from Hashicorp.
I've started working on a proof of concept parser that would allow us to define flag state in HCL and then turn that into native objects that Flipt can work with (ie for import/export or serving evaluation if using a declarative backend).
Heres what it might look like:
Before I go too far, I wanted to open this up for feedback to see:
Search
Additional Context
No response
FLI-916
The text was updated successfully, but these errors were encountered: