Skip to content

[FEATURE] Change fractional custom op from percentage-based to relative weighting. #828

@toddbaert

Description

@toddbaert

Requirements

Currently, the fractional operator in the in-process provider is percentage-based; meaning you must specify the relative distribution of the variants in terms of a percentage. Consistent with flagd, we should change this instead to be a relative weight, meaning that the integers do not need to sum to 100. For example, this fractional:

"fractional": [
          [
            "red",
            25
          ],
          [
            "blue",
            25
          ],
          [
            "green",
            25
          ],
          [
            "grey",
            25
          ]
        ]

Would remain valid, but could also be expressed as:

"fractional": [
          [
            "red",
            1
          ],
          [
            "blue",
            1
          ],
          [
            "green",
            1
          ],
          [
            "grey",
            1
          ]
        ]

See issue and PR in Go/flagd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions