Skip to content

Single evaluation endpoint for variant and boolean types #2507

Open
@jalaziz

Description

@jalaziz

Problem

Splitting boolean and variant feature flag types on the server side makes sense, but having different APIs makes this more complicated client-side as you have to know what type of flag you're evaluating.

While generally you would know, variant flags can easily act as boolean flags, so there's some crossover.

The issue arises when you try to create friendly wrappers around the Flipt client.

In our case, we we're developing a wrapper with a few "friendly" methods that automatically pass the evaluation context. This include methods like IsEnabled, GetAttachment, and Evaluate. In all but the attachment case, the caller doesn't need to know the type of flag.

Ideal Solution

While we could use the batch evaluation API for this, it would be nice to be able to evaluate a single flag and have the response indicate the type. Many of the fields are already shared between the different flag types (with the notable exceptions of segmentKeys, variantKeys, and variantAttachment).

I realize this ask may actually be moving things backwards in a way, but it was easier to build higher level wrapper when there was only one evaluation endpoint.

Search

  • I searched for other open and closed issues before opening this

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalJust putting it out there

    Type

    No type

    Projects

    Status

    Proposed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions