Skip to content

[RemoteFeatureFlagController] Unclear behaviour on threshold ordering. #8122

@Prithpal-Sooriya

Description

@Prithpal-Sooriya

When creating threshold variations, we did not know that variations were to be ordered in ascending order.

For example we had these variations, and didn't realise our "Control" variant was always selected.

See examples and loom recordings

Our variations:

"tokenDetailsV2AbTest": [
  // "control" variant is always selected, as we never order variants by scope.
  {
    "name": "Control is ON",
    "scope": { "type": "threshold", "value": 1 },
    "value": { "minimumVersion": "7.67.0", "variant": "control" }
  },
  {
    "name": "Control is OFF",
    "scope": { "type": "threshold", "value": 0.1 },
    "value": { "minimumVersion": "7.67.0", "variant": "treatment" }
  }
]

Some loom walkthroughs:

Example failing test case added to this draft PR

Is this the intenional behaviour (that threshold scopes must be ordered by ascending value).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions